File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 88# =============================================================================
99
1010""" CSW request and response processor """
11-
11+ import inspect
1212import warnings
1313import StringIO
1414import random
@@ -591,7 +591,10 @@ def _invoke(self):
591591 # If skip_caps=True, then self.operations has not been set, so use
592592 # default URL.
593593 if hasattr (self , 'operations' ):
594- for op in self .operations :
594+ caller = inspect .stack ()[1 ][3 ]
595+ if caller == 'getrecords2' : caller = 'getrecords'
596+ try :
597+ op = self .get_operation_by_name (caller )
595598 post_verbs = filter (lambda x : x .get ('type' ).lower () == 'post' , op .methods )
596599 if len (post_verbs ) > 1 :
597600 # Filter by constraints. We must match a PostEncoding of "XML"
@@ -602,6 +605,8 @@ def _invoke(self):
602605 xml_post_url = post_verbs [0 ].get ('url' )
603606 elif len (post_verbs ) == 1 :
604607 xml_post_url = post_verbs [0 ].get ('url' )
608+ except : # no such luck, just go with xml_post_url
609+ pass
605610
606611 self .request = cleanup_namespaces (self .request )
607612 # Add any namespaces used in the "typeNames" attribute of the
You can’t perform that action at this time.
0 commit comments