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 4c0d2f4..42e7dcd 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 1795e37..51e13a6 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);
                }
        }