Skip to content
New issue

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

HttpSession can't handle HTTP 301 with Location: https,https:// #584

Closed
ns-cweber opened this issue May 10, 2017 · 1 comment
Closed

HttpSession can't handle HTTP 301 with Location: https,https:// #584

ns-cweber opened this issue May 10, 2017 · 1 comment

Comments

@ns-cweber
Copy link

ns-cweber commented May 10, 2017

Given a webserver at https://some.service.com which returns HTTP 301 with a header Location: https,https://some.service.com/foo/bar/baz (no idea if this is a reasonable thing for a webserver to do, but I am seeing this on an internal service) when you attempt to access https://some.service.com/foo/bar/baz and an HttpSession with a base_url of https://some.service.com (e.g., the client property on a TaskSet), when I invoke post("/foo/bar/baz"), I get Cannot GET /foo/bar/https,https://some.service.com/foo/bar/baz. When I check the response.request.url, I see it is https://some.service.com/foo/bar/https,https://some.service.com/foo/bar/baz. If I hit the same service with requests, the redirect is handled correctly.

A couple of strange things here--the POST is being turned into a GET and the odd URL mangling/concatenation.

locustio version: 0.7.5
requests version: 2.14.1
python version: 2.7.13

@ns-cweber
Copy link
Author

Never mind. I further debugged this issue, and it looks like I was passing a subtly different URL to requests than to Locust. Requests does the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant