ignore the length of an env request header
[m6w6/ext-http] / php_http_neon.c
index 99f7cf5bacf3f1687523b643ed47b1713e3b3311..97ebc628df2b7a378bc0d396abb94a14ce483866 100644 (file)
@@ -1,5 +1,19 @@
+/*
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
+*/
 
 #include "php_http.h"
+
+#if PHP_HTTP_HAVE_NEON
+
 #include "php_http_request.h"
 
 #include <ext/date/php_date.h>
@@ -425,7 +439,7 @@ static STATUS set_options(php_http_request_t *h, HashTable *options)
 
                        /* check whether cookies should not be urlencoded; default is to urlencode them */
                        if ((!(urlenc_cookies = get_option(&neon->options.cache, options, ZEND_STRS("encodecookies"), IS_BOOL))) || Z_BVAL_P(urlenc_cookies)) {
-                               php_http_url_encode_hash_recursive(HASH_OF(zoption), &neon->options.headers, "; ", lenof("; "), NULL, 0 TSRMLS_CC);
+                               php_http_url_encode_hash_ex(HASH_OF(zoption), &neon->options.headers, ZEND_STRS("; "), ZEND_STRS("="), NULL, 0 TSRMLS_CC);
                        } else {
                                HashPosition pos;
                                php_http_array_hashkey_t cookie_key = php_http_array_hashkey_init(0);
@@ -894,3 +908,15 @@ PHP_MSHUTDOWN_FUNCTION(http_neon)
        ne_sock_exit();
        return SUCCESS;
 }
+
+#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+