[fix] support all kind of http redirections

git-svn-id: file:///srv/svn/repo/yukari/trunk@7 f3bd38d9-da89-464d-a02a-eb04e43141b5
This commit is contained in:
asciimoo 2016-10-21 19:01:49 +00:00
parent 577232c4e8
commit a8a415b71f

View File

@ -176,7 +176,7 @@ func (p *Proxy) RequestHandler(ctx *fasthttp.RequestCtx) {
if resp.StatusCode() != 200 {
switch resp.StatusCode() {
case 301, 302:
case 301, 302, 303, 307, 308:
loc := resp.Header.Peek("Location")
if loc != nil {
url, err := proxifyURI(&RequestConfig{p.Key, parsedURI}, string(loc))