mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00
r=darin, sr=jst Code from doronr@us.ibm.com - allow empty headers in SOAP to work around Axis bug
This commit is contained in:
parent
2d87a134ca
commit
a05f544756
@ -377,7 +377,15 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
|
|||||||
rv = aCall->GetActionURI(action);
|
rv = aCall->GetActionURI(action);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
if (!AStringIsNull(action)) {
|
|
||||||
|
// Apache Axis web services WSDL files say to set soapAction to "" and require it to be sent.
|
||||||
|
// So only check if its not void instead of using AStringIsNull.
|
||||||
|
if (!action.IsVoid()) {
|
||||||
|
|
||||||
|
//XXXdoron necko doesn't allow empty header values, so set it to " "
|
||||||
|
if (action.IsEmpty())
|
||||||
|
action = NS_LITERAL_STRING(" ");
|
||||||
|
|
||||||
rv = request->SetRequestHeader("SOAPAction",
|
rv = request->SetRequestHeader("SOAPAction",
|
||||||
NS_ConvertUCS2toUTF8(action).get());
|
NS_ConvertUCS2toUTF8(action).get());
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
@ -577,7 +585,16 @@ NS_IMETHODIMP
|
|||||||
rv = aCall->GetActionURI(action);
|
rv = aCall->GetActionURI(action);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
if (!AStringIsNull(action)) {
|
|
||||||
|
// Apache Axis web services WSDL files say to set soapAction to "" and require it to be sent.
|
||||||
|
// So only check if its not void instead of using AStringIsNull.
|
||||||
|
|
||||||
|
if (!action.IsVoid()) {
|
||||||
|
|
||||||
|
//XXXdoron necko doesn't allow empty header values, so set it to " "
|
||||||
|
if (action.IsEmpty())
|
||||||
|
action = NS_LITERAL_STRING(" ");
|
||||||
|
|
||||||
rv = request->SetRequestHeader("SOAPAction",
|
rv = request->SetRequestHeader("SOAPAction",
|
||||||
NS_ConvertUCS2toUTF8(action).get());
|
NS_ConvertUCS2toUTF8(action).get());
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user