With "follow redirect = true", 303 are followed
See original GitHub issueHello
Describe the bug
As you can see, the option is disabled
And when a got a 303 and I’m on preview mode the redirection is followed. I think this is due to the fact there is a “meta refresh” in the body, and it’s interpreted
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='https://api.foo.test/mobile/hotels/search/5e53460b-76df-5725-af84-27a2df117477/results?sortBy=%2Bclosest'" />
<title>Redirecting to https://api.foo.test/mobile/hotels/search/5e53460b-76df-5725-af84-27a2df117477/results?sortBy=%2Bclosest</title>
</head>
<body>
Redirecting to <a href="https://api.foo.test/mobile/hotels/search/5e53460b-76df-5725-af84-27a2df117477/results?sortBy=%2Bclosest">https://api.foo.test/mobile/hotels/search/5e53460b-76df-5725-af84-27a2df117477/results?sortBy=%2Bclosest</a>.
</body>
</html>
More over, the redirected request does not embed the header I manually defined.
If I use “follow redirect: true” everything works fine
Desktop (please complete the following information):
- OS: Ubuntu 18.04
- Installation Method: APT
- App Version 2020.4.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
303 See Other - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 303 See Other redirect status response code indicates that the redirects don't link to the requested ...
Read more >301, 302, 303, 307, and 308: Which HTTP Redirect Status ...
HTTP status code 303 (“See Other”) tells a client that a resource is temporarily available at a different location and explicitly instructs the ......
Read more >followRedirects property - dart:io library - Flutter - Dart API docs
Whether to follow redirects automatically. Set this property to false if this request should not automatically follow redirects. The default is true ....
Read more >How can a java program automatically follow redirection in ...
In your case, you will need to keep following until you get a different status code as you will be redirected two times....
Read more >HTTP 303 - Wikipedia
The HTTP response status code 303 See Other is a way to redirect web applications to a new URI, particularly after a HTTP...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When
follow redirect: true
, Insomnia will follow the redirection. Insomnia is using cUrl under the hood. When the setting is checked, the option FOLLOWLOCATION is given, and cUrl will automatically redirect using theLocation
header when the response status is 30x.When
follow redirect: false
, Insomnia will detect it can render the response in thePreview
mode. This mode will display the response in awebview
. It behaves like an iframe; therefore, the content is interpreted, and themeta redirect
is read and trigger the redirection. The redirection is done regardless of thefollow redirect
settings, and the defined headers are not provided.Honestly, I don’t know how we could handle this edge case. It would be possible to prevent navigation in the webview, but I’m not sure it is a good idea. I will let @nijikokun or @develohpanda give their thoughts.
Actually this issue has not been solved. If we can let it open, it will be better IMHO.