Commit afd10f0bb60bcb7d42da31cf674c0009ab9b82af

Zander Brown 2018-10-13T09:31:20

Follow 308 redirects (as used by GitLab)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/transports/http.c b/src/transports/http.c
index bc3ab18..74452e7 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -395,7 +395,8 @@ static int on_headers_complete(http_parser *parser)
 	if ((parser->status_code == 301 ||
 	     parser->status_code == 302 ||
 	     (parser->status_code == 303 && get_verb == s->verb) ||
-	     parser->status_code == 307) &&
+	     parser->status_code == 307 ||
+	     parser->status_code == 308) &&
 	    t->location) {
 
 		if (s->redirect_count >= 7) {