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

Request not redirected even thought is set to true #285

Closed
ondrej-li opened this issue Nov 2, 2018 · 8 comments
Closed

Request not redirected even thought is set to true #285

ondrej-li opened this issue Nov 2, 2018 · 8 comments

Comments

@ondrej-li
Copy link

  • VSCode Version:1.28.2
  • OS Version: Ubuntu 18.04
  • REST Client Version: 0.20.3

Steps to Reproduce:

  1. connect to server that returns HTTP/307
  2. rest-client should follow it (as per settings), instead it returns the redirect response
HTTP/1.1 307 Temporary Redirect
Server: nginx/1.10.3 (Ubuntu)
Date: Fri, 02 Nov 2018 09:38:16 GMT
Content-Length: 0
Connection: keep-alive
Location: https://api.xxxxxxxxxxxxx.cz
Strict-Transport-Security: max-age=15768000

Just to be sure, the Follow HTTP 3xx responses as redirects option is ON.

@Huachao
Copy link
Owner

Huachao commented Nov 2, 2018

@defectus What's the request method of your request, and can you show me the request url?

@Huachao
Copy link
Owner

Huachao commented Nov 2, 2018

@defectus If it's a non-GET method, I have fixed the issue, and will publish this fix in next release

@Huachao Huachao closed this as completed Nov 2, 2018
@ondrej-li
Copy link
Author

This is a private API so I can't give you the URL to play with, but its something like POST https://api.stage.proxima.o2.cz:443/xxxxx HTTP/1.1. That API resturns the 307 response as shown above but I'd expect it to actually follow the redirect and do POST https://api.stage.gcloud.proxima.o2.cz/xxxx HTTP/1.1.

@Huachao
Copy link
Owner

Huachao commented Nov 2, 2018

That's the case, the fix code targets for this issue

@Huachao
Copy link
Owner

Huachao commented Dec 2, 2018

@defectus you can try the latest version 0.20.4 to verify.

@ondrej-li
Copy link
Author

All seem to be OK. Many thanks!

@tbattiva
Copy link

tbattiva commented Jul 5, 2022

Hello @Huachao
It seems the error on POST requests redirection is back. Could you help me with that?
I'm trying the following request..

POST http://localhost:8000/comm HTTP/1.1
content-type: application/json
Connection: keep-alive
Authorization: Bearer 3XAntrl2WPjldyswINuT9iwiuyVka5

When it is a POST request I'm getting 'HTTP/1.1 301 Moved Permanently', but when the method is changed to GET everything works fine.

@Huachao
Copy link
Owner

Huachao commented Jul 5, 2022

@tbattiva this is related to the bug #948

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

3 participants