mirror of
https://github.com/chainreactors/spray.git
synced 2026-10-29 03:50:47 +00:00
优化location的处理, 某些应用可能会使用小写
This commit is contained in:
1 parent
2c256bb45d
commit
3197ab6388
1 file changed
+5
-1
+5
-1
@@ -43,7 +43,11 @@ func NewBaseline(u, host string, resp *ihttp.Response) *Baseline {
|
||||
bl.ContentType = "other"
|
||||
}
|
||||
bl.Raw = append(bl.Header, bl.Body...)
|
||||
bl.RedirectURL = resp.GetHeader("Location")
|
||||
if r := resp.GetHeader("Location"); r != "" {
|
||||
bl.RedirectURL = r
|
||||
} else {
|
||||
bl.RedirectURL = resp.GetHeader("location")
|
||||
}
|
||||
|
||||
bl.Dir = bl.IsDir()
|
||||
uu, err := url.Parse(u)
|
||||
|
||||
Reference in new issue
Block a user