Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the deal with HTTP status code 308?

Tags:

An IETF RFC draft The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect) defines HTTP status 308 as Permanent Redirect. It should, of course, be noted that this is a draft document and contains in its document header the text "Expires: September 27, 2012", which I presume would mean it should be considered invalid now, but I'm not familiar with IETF's processes and so don't feel confident about this.

The Wikipedia article List of HTTP status codes uses this definition of 308, also:

308 Permanent Redirect (approved as experimental RFC)[12]

The request, and all future requests should be repeated using another URI. 307 and 308 (as proposed) parallel the behaviours of 302 and 301, but do not allow the HTTP method to change. So, for example, submitting a form to a permanently redirected resource may continue smoothly.

...

[12]: "The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect)". IETF. 2012. Retrieved March 27, 2012.

Eric Law, of Microsoft at the time, comments on this HTTP/308 code in Pushing the Web Forward with HTTP/308. That caused me to discover that Firefox supports 308 under this meaning.

However, when I was looking in the python-requests library, I found that there is another usage of 308:

    308: ('resume_incomplete', 'resume'),

This seems to come from a Google Gears resumable HTTP requests proposal, defining 308 Resume Incomplete. There seems to be some usage of that. Of course, neither of these proposals acknowledges the existence of the other.

So what's going on? Is 308 Permanent Redirect alive? What's happening with the status code 308? What should I do?

like image 586
Chris Morgan Avatar asked Jan 03 '13 18:01

Chris Morgan


People also ask

What does the 308 HTTP status code stand for?

The HyperText Transfer Protocol (HTTP) 308 Permanent Redirect redirect status response code indicates that the resource requested has been definitively moved to the URL given by the Location headers.

How do I fix status code 308?

A 308 Permanent Redirect status code indicates that the resource the user tried to access has moved to a new URI. The best way to fix the 308 Permanent Redirect status code is to: Confirm your server configuration. Debug your application code.

What is the difference between 301 and 308?

The main difference between the 301 and 308 redirects is that when a 308 redirect code is specified, the client must repeat the exact same request (POST or GET) on the target location. For 301 redirect, the client may not necessarily follow the exact same request.


1 Answers

The Internet Draft has not expired (as it was approved before it expired). See https://datatracker.ietf.org/doc/draft-reschke-http-status-308/ and http://www.rfc-editor.org/queue2.html#draft-reschke-http-status-308 for the current publication status.

like image 95
Julian Reschke Avatar answered Sep 23 '22 18:09

Julian Reschke