Patch fix-soap-stream-context-http-header-overwrite for SOAP related Bug #49853
Patch version 2011-11-15 20:27 UTC
Return to Bug #49853 |
Download this patch
Patch Revisions:
Developer: michaelclark@zagg.com
Index: ext/soap/php_sdl.c
===================================================================
--- ext/soap/php_sdl.c (revision 319075)
+++ ext/soap/php_sdl.c (working copy)
@@ -3270,7 +3270,7 @@
ZVAL_DOUBLE(http_version, 1.1);
php_stream_context_set_option(context, "http", "protocol_version", http_version);
zval_ptr_dtor(&http_version);
- smart_str_appendl(&headers, "Connection: close", sizeof("Connection: close")-1);
+ smart_str_appendl(&headers, "Connection: close\r\n", sizeof("Connection: close\r\n")-1);
}
if (headers.len > 0) {
@@ -3278,6 +3278,8 @@
if (!context) {
context = php_stream_context_alloc(TSRMLS_C);
+ } else if (php_stream_context_get_option(context, "http", "header", &tmp) != FAILURE) {
+ smart_str_appendl(&headers, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
}
smart_str_0(&headers);
|