You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# check for service exceptions without the http header set if 'Content-Type' in req.headers and \ req.headers['Content-Type'] in ['text/xml', 'application/xml', 'application/vnd.ogc.se_xml']: # just in case 400 headers were not set, going to have to read the xml to see if it's an exception report.
In the code example provided above (util.openURL function), Content-Type value is checked only against MIME type, so errors with content types like "text/xml;charset=utf-8" won't be handled.
I think this check would be better: re.sub(";.*$", "", req.headers['Content-Type') in ['text/xml', 'application/xml', 'application/vnd.ogc.se_xml']:
The text was updated successfully, but these errors were encountered:
# check for service exceptions without the http header set if 'Content-Type' in req.headers and \ req.headers['Content-Type'] in ['text/xml', 'application/xml', 'application/vnd.ogc.se_xml']: # just in case 400 headers were not set, going to have to read the xml to see if it's an exception report.
In the code example provided above (util.openURL function), Content-Type value is checked only against MIME type, so errors with content types like "text/xml;charset=utf-8" won't be handled.
I think this check would be better:
re.sub(";.*$", "", req.headers['Content-Type') in ['text/xml', 'application/xml', 'application/vnd.ogc.se_xml']:
The text was updated successfully, but these errors were encountered: