X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request.c;h=26e87f6ab066f200ca0c92528863a2744cd73ad3;hp=d65ea5c3e57e2d4ec6404032388c976f86854f33;hb=4407379af8d886b627c88572e9da69c38cdbda58;hpb=0e1dcdcd221942f66fe01fdaf1f79f8ef55a527a diff --git a/php_http_request.c b/php_http_request.c index d65ea5c..26e87f6 100644 --- a/php_http_request.c +++ b/php_http_request.c @@ -10,11 +10,9 @@ +--------------------------------------------------------------------+ */ -#include "php_http.h" +#include "php_http_api.h" #include -#include -#include PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC) { @@ -26,7 +24,7 @@ PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, ph memset(h, 0, sizeof(*h)); h->ops = ops; - h->rf = rf ? rf : php_http_resource_factory_init(NULL, h->ops->rsrc, NULL, NULL); + h->rf = rf ? rf : php_http_resource_factory_init(NULL, h->ops->rsrc, h, NULL); h->buffer = php_http_buffer_init(NULL); h->parser = php_http_message_parser_init(NULL TSRMLS_CC); h->message = php_http_message_init(NULL, 0 TSRMLS_CC); @@ -546,6 +544,7 @@ STATUS php_http_request_object_responsehandler(php_http_request_object_t *obj, z static int apply_pretty_key(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) { if (hash_key->arKey && hash_key->nKeyLength > 1) { + /* FIXME: this seems evil */ hash_key->h = zend_hash_func(php_http_pretty_key(hash_key->arKey, hash_key->nKeyLength - 1, 1, 0), hash_key->nKeyLength); } return ZEND_HASH_APPLY_KEEP;