X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_message.c;h=2c25aec7c7c431326302c999bce418be0fde8741;hb=0384973e0d4b7401fd7653c95178934a5ead9bcc;hp=58d8ee9d05c785cb46494e9eaefbd0d60cd4a530;hpb=61067d19cf03ad876954c2644ff9e37942b2ad67;p=m6w6%2Fext-http diff --git a/php_http_message.c b/php_http_message.c index 58d8ee9..2c25aec 100644 --- a/php_http_message.c +++ b/php_http_message.c @@ -393,7 +393,6 @@ PHP_HTTP_API void php_http_message_to_callback(php_http_message_t *msg, php_http if (php_http_message_body_size(&msg->body)) { cb(cb_arg, ZEND_STRL(PHP_HTTP_CRLF)); php_http_message_body_to_callback(&msg->body, cb, cb_arg, 0, 0); - cb(cb_arg, ZEND_STRL(PHP_HTTP_CRLF)); } } @@ -407,7 +406,6 @@ PHP_HTTP_API void php_http_message_to_string(php_http_message_t *msg, char **str if (php_http_message_body_size(&msg->body)) { php_http_buffer_appends(&str, PHP_HTTP_CRLF); php_http_message_body_to_callback(&msg->body, (php_http_pass_callback_t) php_http_buffer_append, &str, 0, 0); - php_http_buffer_appends(&str, PHP_HTTP_CRLF); } data = php_http_buffer_data(&str, string, length); @@ -428,6 +426,7 @@ PHP_HTTP_API void php_http_message_serialize(php_http_message_t *message, char * do { php_http_message_to_string(message, &buf, &len); + php_http_buffer_prepends(&str, PHP_HTTP_CRLF); php_http_buffer_prepend(&str, buf, len); efree(buf); } while ((message = message->parent));