Skip to content

Commit ce7935e

Browse files
committed
Don't pass null action to __doRequest
The parameter is not nullable, so it will be interpreted as an empty string anyway. The entire code here is pretty confusing though, and probably deserves a second loop. The HTTP code only send SOAPAction/action if soapaction is non-NULL -- but it always is, because it is accepted through a non-nullable string parameter. Regarding the SOAPAction header, it appears that always sending it is actually a requirement of the standard: > An HTTP client MUST use this header field when issuing a SOAP > HTTP Request. Although it does make a distinction between absence of value and an empty string: > The header field value of empty string ("") means that the intent > of the SOAP message is provided by the HTTP Request-URI. No value > means that there is no indication of the intent of the message. The empty string interpretation appears to be the desired one. However, for the action MIME tag the SOAP 1.2 Part 2 specification says that > The media type specifies an optional action parameter, which can > be used to optimize dispatch or routing, among other things. but also > The SOAP Action feature defines a single property, which is > described in Table 14. The value of this property MUST be an > absolute URI[RFC 3986] and MUST NOT be empty. which would indicate that we should not be sending an empty action here. As I'm not familiar with SOAP and this is long-standing behavior, I'm just leaving this alone for now...
1 parent 40ba9f6 commit ce7935e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/soap/soap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2217,7 +2217,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
22172217
ZVAL_STRINGL(&params[0], buf, buf_size);
22182218
ZVAL_STRING(&params[1], location);
22192219
if (action == NULL) {
2220-
ZVAL_NULL(&params[2]);
2220+
ZVAL_EMPTY_STRING(&params[2]);
22212221
} else {
22222222
ZVAL_STRING(&params[2], action);
22232223
}

0 commit comments

Comments
 (0)