Skip to content

Commit

Permalink
proper check for http transport in soap. Fixes arskom#446
Browse files Browse the repository at this point in the history
  • Loading branch information
plq committed Jul 28, 2015
1 parent 498a829 commit fbd1314
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spyne/protocol/soap/soap11.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from spyne.model.primitive import DateTime
from spyne.protocol.xml import XmlDocument
from spyne.protocol.soap.mime import collapse_swa
from spyne.server.http import HttpTransportContext


def _from_soap(in_envelope_xml, xmlids=None, **kwargs):
Expand Down Expand Up @@ -177,7 +178,7 @@ def __init__(self, *args, **kwargs):
self._from_unicode_handlers[DateTime] = self.datetime_from_string_iso

def create_in_document(self, ctx, charset=None):
if ctx.transport.type == 'wsgi':
if isinstance(ctx.transport, HttpTransportContext):
# according to the soap via http standard, soap requests must only
# work with proper POST requests.
content_type = ctx.transport.req_env.get("CONTENT_TYPE")
Expand Down

0 comments on commit fbd1314

Please sign in to comment.