Skip to content

Commit

Permalink
[server][test] Add protocol and host:port to path in the test server
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jan 17, 2018
1 parent 8c74c5b commit 4fc2b3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/src/python/qgis_wrapped_server.py
Expand Up @@ -166,6 +166,8 @@ def do_GET(self, post_body=None):
headers = {}
for k, v in self.headers.items():
headers['HTTP_%s' % k.replace(' ', '-').replace('-', '_').replace(' ', '-').upper()] = v
if not self.path.startswith('http'):
self.path = "%s://%s:%s%s" % ('https' if https else 'http', QGIS_SERVER_HOST, QGIS_SERVER_PORT, self.path)
request = QgsBufferServerRequest(self.path, (QgsServerRequest.PostMethod if post_body is not None else QgsServerRequest.GetMethod), headers, post_body)
response = QgsBufferServerResponse()
qgs_server.handleRequest(request, response)
Expand Down

0 comments on commit 4fc2b3e

Please sign in to comment.