We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following Hurl file:
redirect.hurl:
# Absolute redirects GET http://localhost:8000/redirect HTTP/1.0 302 Location: http://localhost:8000/redirected GET http://localhost:8000/redirected HTTP/1.0 200 GET http://localhost:8000/redirect [Options] location: true HTTP/1.0 200 ```Redirected``` # Relative redirects GET http://localhost:8000/relative-redirect HTTP/1.0 302 Location: /redirected GET http://localhost:8000/relative-redirect [Options] location: true HTTP/1.0 200 ```Redirected```
redirect.py:
from app import app from flask import redirect, Response @app.route("/redirect") def redirectme(): return redirect("http://localhost:8000/redirected") @app.route("/relative-redirect") def relative_redirectme(): response = Response(status=302) response.headers['Location'] = '/redirected' response.autocorrect_location_header = False return response @app.route("/redirected") def redirected(): return "Redirected"
Hurl is in error:
error: HTTP connection --> integration/tests_ok/redirect.hurl:22:5 | 22 | GET http://localhost:8000/relative-redirect | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (3) URL using bad/illegal format or missing URL |
Whereas curl command is ok:
$ curl 'http://localhost:8000/relative-redirect' -L Redirected
It seems like we have issues with relative Location header. curl seems ok with it and on MDN location can be relative:
A relative (to the request URL) or absolute URL.
The text was updated successfully, but these errors were encountered:
fabricereix
Successfully merging a pull request may close this issue.
Given the following Hurl file:
redirect.hurl:
redirect.py:
Hurl is in error:
Whereas curl command is ok:
It seems like we have issues with relative Location header. curl seems ok with it and on MDN location can be relative:
The text was updated successfully, but these errors were encountered: