Questions tagged [http-status-code-307]

307 Temporary Redirect -- HTTP status code introduced in HTTP 1.1

Introduced in HTTP 1.1, the 307 status code was created to indicate a resource that has moved temporarily. This was supposed to have been handled by the 302 status code, but industry practice had 302 redirects changed to GET requests in contradiction to the standard set out in RFC 1945. Clients receiving a 307 response should repeat their request using the same method used for the initial request, so a POST request would be repeated with a POST request to the new location.

57 questions
31
votes
1 answer

Keep getting "307 Temporary Redirect" before returning status 200 hosted on FastAPI + uvicorn + Docker app - how to return status 200?

Edit: I found the problem but not sure why this happens. Whenever I query: http://localhost:4001/hello/ with the "/" in the end - I get a proper 200 status response. I do not understand why. Original Post: Whenever I send a query to my app - I keep…
Imnotapotato
  • 5,308
  • 13
  • 80
  • 147
21
votes
2 answers

Avoiding 301 redirect caching

This is a follow up question to Using 301/303/307 redirects for dynamic short urls, where I try to determine the best method for implementing short url redirection when the destination url will change on a frequent basis. While it seems that 301 and…
Yarin
  • 173,523
  • 149
  • 402
  • 512
21
votes
1 answer

301 redirect vs 307 redirect

I am wondering about the difference between 301 and 307 redirects. I am looking to generate backlinks through a home-brew url redirector, and I wish for any of the "link juice" or "page rank juice" to flow directly from the originating back page…
13
votes
1 answer

Get the url of a redirect with Rest Assured?

I am making a GET request which then makes a 307 redirect to another URL and from there it makes another 302 redirect and so on till it gets to the requested page. I am having problems extracting the URL from the first redirect, the 307, I want to…
Gudzo
  • 639
  • 2
  • 8
  • 21
11
votes
2 answers

.NET Core 3.1 API - 307 Temporary Redirect

When upgrading my .NET Core 2.2 API to .NET Core 3.1, a lot of changes were required. I had to update the Swashbuckle package and change the Startup file. I now got it running in dev with Swagger. Once publishing to a Windows 2012 server, running on…
NiAu
  • 535
  • 1
  • 12
  • 32
11
votes
3 answers

Return 307 Temporary Redirect in ASP.NET MVC

Is it possible to return a 307 Temporary Redirect from a controller in ASP.NET MVC? I sometimes need to re-POST the values submitted from one form to another URI. Using JavaScript to do the selection on the client side (thereby bypassing this issue)…
Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
7
votes
3 answers

POST requests fail when is set

Consider the following case: A web server is running a .NET app with . A client is POSTing data to it using a simple HttpWebRequest (no cookies). This seemingly simple case causes major failure. Since .NET…
Anton
  • 4,554
  • 2
  • 37
  • 60
6
votes
2 answers

Using 301/303/307 redirects for dynamic short urls

We're implementing a short url service where the redirection target will be changing daily. The urls will be accessed by mobile devices and will always be GET requests. I'm trying to understand which is the best 300-type redirect for the job. AFAIK…
Yarin
  • 173,523
  • 149
  • 402
  • 512
5
votes
1 answer

Chrome redirects and makes 2 requests of the same page (307 Internal Redirect), how to prevent?

We have a page in php, that may take some time to load and the response time can be over 30 seconds, it has a heavy script and it is normal, not open to the public. This page saves a log on our database everytime it is executed, and I noticed that,…
multimediaxp
  • 9,348
  • 13
  • 49
  • 80
5
votes
0 answers

307 redirect with altered post data

I have a post request to script1.php that redirect with 307 status to script2.php a post request with the same data received in script1.php , my question is if it is possible to alter the post data in script1.php before making the redirect so in…
5
votes
1 answer

Adding headers to 307 redirection

Is it true that you cannot add/modified 307 header except Location? I'm trying to do that in Node.js and seems that newly added header 'X-Atlassian-Token': 'no-check' is not used by the client. res.writeHead(307, { …
KMC
  • 1,677
  • 3
  • 26
  • 55
4
votes
1 answer

HTTP 307 Redirects -- Supported By Most Browsers Since IE6?

So evidently in 2010, Matt Cutts at Google revealed in an interview, along with a follow-up email exchange after the interview, that Google deducts page rank if you use domain-to-domain HTTP status 301 redirects. In other words, if you have…
Volomike
  • 23,743
  • 21
  • 113
  • 209
3
votes
1 answer

How to get around CORS error on a 307 redirect

I'm using a 307 redirect mod_rewrite rule in my .htaccess to redirect all /api/... requests to an apiHandler.php, and I'm having trouble with CORS. My .htaccess RewriteEngine On RewriteRule ^api/(.*)$ /apiHandler.php [NC,R=307] My…
Jacob
  • 439
  • 6
  • 19
3
votes
0 answers

Facebook/Twitter/GooglePlus Sharing and 307 Redirects

On my site, when a user initially visits and they do not have an assigned session token, a 307 redirect them to a subdomain where the token is applied, and then brings them back to the page they were currently on. This is done for SSO across…
Devin Dixon
  • 11,553
  • 24
  • 86
  • 167
2
votes
1 answer

python 3.7 urllib.request doesn't follow redirect URL

I'm using Python 3.7 with urllib. All work fine but it seems not to athomatically redirect when it gets an http redirect request (307). This is the error i get: ERROR 2020-06-15 10:25:06,968 HTTP Error 307: Temporary Redirect I've to handle it with…
1
2 3 4