Skip to content

Commit

Permalink
Fix empty SOAPAction header
Browse files Browse the repository at this point in the history
SOAPAction header should never be "None".

When `self.operation.soapaction` is `None` it was stringifyed into `"None"` when it should be `""`.
  • Loading branch information
davidolrik authored and mvantellingen committed Nov 3, 2022
1 parent b50cb54 commit 9c5a016
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/zeep/wsdl/messages/soap.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ def serialize(self, *args, **kwargs):
# XXX: This is only used in Soap 1.1 so should be moved to the the
# Soap11Binding._set_http_headers(). But let's keep it like this for
# now.
headers = {"SOAPAction": '"%s"' % self.operation.soapaction}
headers = {
"SOAPAction": '"%s"' % self.operation.soapaction
if self.operation.soapaction
else '""'
}
return SerializedMessage(path=None, headers=headers, content=envelope)

def deserialize(self, envelope):
Expand Down

0 comments on commit 9c5a016

Please sign in to comment.