Currently, your Flask server supports only GET request (default), so testing results are not reflecting header processing quirks.
To enable other methods, @app.route decorators could be replaced by direct route adding:
import sys
from flask import Flask
from werkzeug.routing import Rule
app = Flask(__name__)
app.url_map.add(Rule('/', defaults={"path": ""}, endpoint='catch_all'))
app.url_map.add(Rule('/<path:path>', endpoint='catch_all'))
@app.endpoint('catch_all')
def catch_all(path):
return "OK"
if __name__ == "__main__":
port = int(sys.argv[1]) if len(sys.argv) > 1 else 9002
app.run(host="0.0.0.0", port=port)
Currently, your
Flaskserver supports onlyGETrequest (default), so testing results are not reflecting header processing quirks.To enable other methods,
@app.routedecorators could be replaced by direct route adding: