MFB
authorMichael Wallner <mike@php.net>
Fri, 12 Jun 2009 10:01:27 +0000 (10:01 +0000)
committerMichael Wallner <mike@php.net>
Fri, 12 Jun 2009 10:01:27 +0000 (10:01 +0000)
http_headers_api.c
http_request_object.c

index 4c0d2f4c152dc84446b482cbe5b7fade3b3f1d7b..42e7dcd7d9fd361d6cc42aa1e224cbb4aec3b39d 100644 (file)
@@ -131,7 +131,7 @@ PHP_HTTP_API HashTable *_http_negotiate_q(const char *header, HashTable *support
                ZVAL_STRINGL(&ex_del, ",", 1, 0);
                array_init(&ex_arr);
                
-               php_explode(&ex_del, accept, &ex_arr, -1);
+               php_explode(&ex_del, accept, &ex_arr, INT_MAX);
                
                if (zend_hash_num_elements(Z_ARRVAL(ex_arr)) > 0) {
                        int i = 0;
index 1795e37a30f7c29157bc578870f5d869c82c7cf5..51e13a6964fd67cbd4b3a0ef40c32f74257161b3 100644 (file)
@@ -1314,14 +1314,14 @@ PHP_METHOD(HttpRequest, addBody)
        }
        
        if (data_len) {
-               zval *data = zend_read_property(THIS_CE, getThis(), ZEND_STRS("rrequestBody")-1, 0 TSRMLS_CC);
+               zval *data = zend_read_property(THIS_CE, getThis(), ZEND_STRS("requestBody")-1, 0 TSRMLS_CC);
                
                if (Z_STRLEN_P(data)) {
                        Z_STRVAL_P(data) = erealloc(Z_STRVAL_P(data), (Z_STRLEN_P(data) += data_len) + 1);
                        Z_STRVAL_P(data)[Z_STRLEN_P(data)] = '\0';
                        memcpy(Z_STRVAL_P(data) + Z_STRLEN_P(data) - data_len, raw_data, data_len);
                } else {
-                       zend_update_property_stringl(THIS_CE, getThis(), ZEND_STRS("putData")-1, raw_data, data_len TSRMLS_CC);
+                       zend_update_property_stringl(THIS_CE, getThis(), ZEND_STRS("requestBody")-1, raw_data, data_len TSRMLS_CC);
                }
        }