Fetching - Always record server software reply headers (will be used in the future) (#2143)

This commit is contained in:
dgtlmoon
2024-01-31 16:15:43 +01:00
committed by GitHub
parent fca40e4d5b
commit 7d96b4ba83
7 changed files with 50 additions and 21 deletions

View File

@@ -175,12 +175,16 @@ def live_server_setup(live_server):
@live_server.app.route('/test-headers')
def test_headers():
output= []
output = []
for header in request.headers:
output.append("{}:{}".format(str(header[0]),str(header[1]) ))
output.append("{}:{}".format(str(header[0]), str(header[1])))
return "\n".join(output)
content = "\n".join(output)
resp = make_response(content, 200)
resp.headers['server'] = 'custom'
return resp
# Just return the body in the request
@live_server.app.route('/test-body', methods=['POST', 'GET'])