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

Location redirects to url with quotes #246

Closed
lodle opened this issue Jan 13, 2015 · 0 comments · Fixed by #247
Closed

Location redirects to url with quotes #246

lodle opened this issue Jan 13, 2015 · 0 comments · Fixed by #247

Comments

@lodle
Copy link

lodle commented Jan 13, 2015

Redirecting using location like this:

res.headers_mut().set(hyper::header::common::location::Location("/newlocation".to_string()));

ends up going to the url http://127.0.0.1:1337/"newlocation" instead of http://127.0.0.1:1337/newlocation. Using set_raw works fine:

res.headers_mut().set_raw("Location", vec![b"/newlocation".to_vec()]);
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

Successfully merging a pull request may close this issue.

1 participant