]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: Return the right reason for 302
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Jul 2023 06:47:12 +0000 (08:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Jul 2023 09:14:10 +0000 (11:14 +0200)
Because of a cut/paste error, the wrong reason was returned for 302
code. The 301 reason was returned instead. Thus now, "Found" is returned for
302, instead of "Moved Permanently".

This pathc should fix the issue 2208. It must be backported to all stable
versions.

src/http.c

index 8aef755fd202d0bf633dfe846cb336579ceee73b..18f111c9553712b88980d1b4570cb97e1259cb6d 100644 (file)
@@ -413,7 +413,7 @@ const char *http_get_reason(unsigned int status)
        case 226: return "IM Used";
        case 300: return "Multiple Choices";
        case 301: return "Moved Permanently";
-       case 302: return "Moved Temporarily";
+       case 302: return "Found";
        case 303: return "See Other";
        case 304: return "Not Modified";
        case 305: return "Use Proxy";