Extracted location header into Result json to allow for additional data 3XX processing

This commit is contained in:
tracertea 2020-08-11 11:24:55 -04:00
parent 5a60c9e0a9
commit a56d72e61e

View File

@ -381,6 +381,7 @@ retry:
URL: fullURL,
ContentLength: resp.ContentLength,
StatusCode: resp.StatusCode,
Location: resp.GetHeaderPart("Location", ";"),
ContentType: resp.GetHeaderPart("Content-Type", ";"),
Title: title,
str: builder.String(),
@ -397,6 +398,7 @@ type Result struct {
URL string `json:"url"`
ContentLength int `json:"content-length"`
StatusCode int `json:"status-code"`
Location string `json:"location"`
Title string `json:"title"`
str string
err error