]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] http: move redirect messages to HTTP/1.1 with a content-length
authorWilly Tarreau <w@1wt.eu>
Sun, 3 Jan 2010 14:09:36 +0000 (15:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 3 Jan 2010 14:12:05 +0000 (15:12 +0100)
This is cleaner and this tells clients we support 1.1.

src/proto_http.c

index e8fc4afeabd54e1a4ad0cf705a91691d3103d686..1648083d4eb32ae8ed34a511329155a206c03663 100644 (file)
@@ -80,21 +80,24 @@ const struct chunk http_200_chunk = {
 };
 
 const char *HTTP_301 =
-       "HTTP/1.0 301 Moved Permantenly\r\n"
+       "HTTP/1.1 301 Moved Permanently\r\n"
        "Cache-Control: no-cache\r\n"
+       "Content-length: 0\r\n"
        "Connection: close\r\n"
        "Location: "; /* not terminated since it will be concatenated with the URL */
 
 const char *HTTP_302 =
-       "HTTP/1.0 302 Found\r\n"
+       "HTTP/1.1 302 Found\r\n"
        "Cache-Control: no-cache\r\n"
+       "Content-length: 0\r\n"
        "Connection: close\r\n"
        "Location: "; /* not terminated since it will be concatenated with the URL */
 
 /* same as 302 except that the browser MUST retry with the GET method */
 const char *HTTP_303 =
-       "HTTP/1.0 303 See Other\r\n"
+       "HTTP/1.1 303 See Other\r\n"
        "Cache-Control: no-cache\r\n"
+       "Content-length: 0\r\n"
        "Connection: close\r\n"
        "Location: "; /* not terminated since it will be concatenated with the URL */