X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_api.c;h=3dabcd759d5302d2094f534ebec04ef39836268c;hp=5bc0f8fb3ae9a28537812402b9f0c29c6fbfcf46;hb=3d4001d8462ccf22372b7436e1a1c134e83b683e;hpb=8e61e5e6b8d15afb9e11a2ae9f79db3a930046ea diff --git a/http_request_api.c b/http_request_api.c index 5bc0f8f..3dabcd7 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -154,7 +154,6 @@ void *_http_request_data_copy(int type, void *data TSRMLS_DC) case COPY_STRING: { char *new_str = estrdup(data); - //fprintf(stderr, "COPY STRING: %p (%s)\n", new_str, new_str); zend_llist_add_element(&HTTP_G(request).copies.strings, &new_str); return new_str; } @@ -414,7 +413,7 @@ PHP_HTTP_API STATUS _http_request_init(CURL *ch, http_request_method meth, char /* compress, empty string enables deflate and gzip */ if (zoption = http_curl_getopt(options, "compress", IS_BOOL)) { if (Z_LVAL_P(zoption)) { - HTTP_CURL_OPT(ENCODING, http_request_data_copy(COPY_STRING, "")); + HTTP_CURL_OPT(ENCODING, ""); } } @@ -438,7 +437,7 @@ PHP_HTTP_API STATUS _http_request_init(CURL *ch, http_request_method meth, char if (zoption = http_curl_getopt(options, "useragent", IS_STRING)) { HTTP_CURL_OPT(USERAGENT, http_request_data_copy(COPY_STRING, Z_STRVAL_P(zoption))); } else { - HTTP_CURL_OPT(USERAGENT, http_request_data_copy(COPY_STRING, "PECL::HTTP/" HTTP_PEXT_VERSION " (PHP/" PHP_VERSION ")")); + HTTP_CURL_OPT(USERAGENT, "PECL::HTTP/" HTTP_PEXT_VERSION " (PHP/" PHP_VERSION ")"); } /* additional headers, array('name' => 'value') */