Skip to content

Commit 9c5a016

Browse files
davidolrikmvantellingen
authored andcommitted
Fix empty SOAPAction header
SOAPAction header should never be "None". When `self.operation.soapaction` is `None` it was stringifyed into `"None"` when it should be `""`.
1 parent b50cb54 commit 9c5a016

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/zeep/wsdl/messages/soap.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ def serialize(self, *args, **kwargs):
8484
# XXX: This is only used in Soap 1.1 so should be moved to the the
8585
# Soap11Binding._set_http_headers(). But let's keep it like this for
8686
# now.
87-
headers = {"SOAPAction": '"%s"' % self.operation.soapaction}
87+
headers = {
88+
"SOAPAction": '"%s"' % self.operation.soapaction
89+
if self.operation.soapaction
90+
else '""'
91+
}
8892
return SerializedMessage(path=None, headers=headers, content=envelope)
8993

9094
def deserialize(self, envelope):

0 commit comments

Comments
 (0)