The Wayback Machine - https://web.archive.org/web/20200602161943/https://github.com/Kong/insomnia/issues/1991
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

[Bug] 301 Moved Permanently - Cache Issue #1991

Open
masseelch opened this issue Mar 11, 2020 · 6 comments
Open

[Bug] 301 Moved Permanently - Cache Issue #1991

masseelch opened this issue Mar 11, 2020 · 6 comments

Comments

@masseelch
Copy link

@masseelch masseelch commented Mar 11, 2020

Describe the bug
Calling a route which returns a 301 response correctly redirects. If the route then no longer returns a 301 insomnia still will redirect to the resource. I cannot find any other way then completely wipe out all insomnia configuration to reset this cached redirect.

To Reproduce
Steps to reproduce the behavior:

  1. call a route which returns 301
  2. let the route no longer return 301
  3. call it again
  4. insomnia will redirect like the route still returns the 301

Expected behavior
I no longer get redirected.

Desktop:

  • OS: manjaro
  • Installation Method: aur
  • App Version v7.1.1
@gschier
Copy link
Contributor

@gschier gschier commented Mar 17, 2020

Hmm, that's interesting. I guess libcurl is remembering 301 (permanent redirect) redirects as it is supposed to. However, you're correct that this behavior does not really make sense for an app like Insomnia.

After some Googling, it doesn't look like there's a way to have libcurl not cache 301s. Does it reset after Insomnia is restarted @masseelch?

@masseelch
Copy link
Author

@masseelch masseelch commented Mar 17, 2020

Restarting does not reset the cache. A fresh install, which essentially deletes the cache folder of insomnia, does reset the saved 301.

@masseelch
Copy link
Author

@masseelch masseelch commented Mar 17, 2020

BTW, as far as I know libcurl does not cache anything. But I might be wrong there.

@gschier
Copy link
Contributor

@gschier gschier commented Mar 30, 2020

I didn't think it cached anything either. Insomnia defers to libcurl for all redirect handling so it's hard to say what's going on for sure.

Can you test curl (not necessarily the same behavior as libcurl) from the command line to see if it exhibits the same behavior?

@masseelch
Copy link
Author

@masseelch masseelch commented Apr 1, 2020

Will do on the weekend 👍

@masseelch
Copy link
Author

@masseelch masseelch commented Apr 5, 2020

curl does not cache / save 301 responses.

I called a route, returned 301 and curl followed.
Called route again, did return 200 and curl did not redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.