Skip to content

Commit 4fc2b3e

Browse files
committed
[server][test] Add protocol and host:port to path in the test server
1 parent 8c74c5b commit 4fc2b3e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/src/python/qgis_wrapped_server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def do_GET(self, post_body=None):
166166
headers = {}
167167
for k, v in self.headers.items():
168168
headers['HTTP_%s' % k.replace(' ', '-').replace('-', '_').replace(' ', '-').upper()] = v
169+
if not self.path.startswith('http'):
170+
self.path = "%s://%s:%s%s" % ('https' if https else 'http', QGIS_SERVER_HOST, QGIS_SERVER_PORT, self.path)
169171
request = QgsBufferServerRequest(self.path, (QgsServerRequest.PostMethod if post_body is not None else QgsServerRequest.GetMethod), headers, post_body)
170172
response = QgsBufferServerResponse()
171173
qgs_server.handleRequest(request, response)

0 commit comments

Comments
 (0)