dmitry Fri Feb 15 06:50:39 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/soap soap.c
Log:
Fixed bug #43507 (SOAPFault HTTP Status 500 - would like to be able to set
the HTTP Status)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1079&r2=1.2027.2.547.2.1080&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1079 php-src/NEWS:1.2027.2.547.2.1080
--- php-src/NEWS:1.2027.2.547.2.1079 Thu Feb 14 14:47:25 2008
+++ php-src/NEWS Fri Feb 15 06:50:39 2008
@@ -50,6 +50,8 @@
timezone). (Derick)
- Fixed bug #43522 (stream_get_line() eats additional characters). (Felipe,
Ilia, Tony)
+- Fixed bug #43507 (SOAPFault HTTP Status 500 - would like to be able to set
+ the HTTP Status). (Dmitry)
- Fixed bug #43505 (Assign by reference bug). (Dmitry)
- Fixed bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory).
(Chris)
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.156.2.28.2.37&r2=1.156.2.28.2.38&diff_format=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.156.2.28.2.37
php-src/ext/soap/soap.c:1.156.2.28.2.38
--- php-src/ext/soap/soap.c:1.156.2.28.2.37 Wed Jan 16 06:14:45 2008
+++ php-src/ext/soap/soap.c Fri Feb 15 06:50:39 2008
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.156.2.28.2.37 2008/01/16 06:14:45 dmitry Exp $ */
+/* $Id: soap.c,v 1.156.2.28.2.38 2008/02/15 06:50:39 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -2007,6 +2007,8 @@
char cont_len[30];
int size;
xmlDocPtr doc_return;
+ zval **agent_name;
+ int use_http_error_status = 1;
soap_version = SOAP_GLOBAL(soap_version);
@@ -2014,11 +2016,21 @@
xmlDocDumpMemory(doc_return, &buf, &size);
+ zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC);
+ if (PG(http_globals)[TRACK_VARS_SERVER] &&
+ zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht,
"HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name) == SUCCESS
&&
+ Z_TYPE_PP(agent_name) == IS_STRING) {
+ if (strncmp(Z_STRVAL_PP(agent_name), "Shockwave Flash",
sizeof("Shockwave Flash")-1) == 0) {
+ use_http_error_status = 0;
+ }
+ }
/*
Want to return HTTP 500 but apache wants to over write
our fault code with their own handling... Figure this out later
*/
- sapi_add_header("HTTP/1.1 500 Internal Service Error", sizeof("HTTP/1.1
500 Internal Service Error")-1, 1);
+ if (use_http_error_status) {
+ sapi_add_header("HTTP/1.1 500 Internal Service Error",
sizeof("HTTP/1.1 500 Internal Service Error")-1, 1);
+ }
if (soap_version == SOAP_1_2) {
sapi_add_header("Content-Type: application/soap+xml;
charset=utf-8", sizeof("Content-Type: application/soap+xml; charset=utf-8")-1,
1);
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php