From a56d72e61e549710f16f11e60056b7f71bea9028 Mon Sep 17 00:00:00 2001 From: tracertea Date: Tue, 11 Aug 2020 11:24:55 -0400 Subject: [PATCH] Extracted location header into Result json to allow for additional data 3XX processing --- cmd/httpx/httpx.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/httpx/httpx.go b/cmd/httpx/httpx.go index d3dcf88..26e9a66 100644 --- a/cmd/httpx/httpx.go +++ b/cmd/httpx/httpx.go @@ -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