From: Michael Wallner Date: Fri, 12 Jun 2009 10:01:27 +0000 (+0000) Subject: MFB X-Git-Tag: RELEASE_1_7_0b2~26 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=4a8fc95fc8796d7e1f2394c63345fa9def53e821;p=m6w6%2Fext-http MFB --- diff --git a/http_headers_api.c b/http_headers_api.c index 4c0d2f4..42e7dcd 100644 --- a/http_headers_api.c +++ b/http_headers_api.c @@ -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; diff --git a/http_request_object.c b/http_request_object.c index 1795e37..51e13a6 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -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); } }