mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
优化location的处理, 某些应用可能会使用小写
This commit is contained in:
parent
f185dd80e9
commit
ae746b9e67
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user