MCPcopy
hub / github.com/projectdiscovery/katana / headerLocationParser

Function headerLocationParser

pkg/engine/parser/parser.go:145–152  ·  view source on GitHub ↗

headerLocationParser parsers Location header from response

(resp *navigation.Response)

Source from the content-addressed store, hash-verified

143
144// headerLocationParser parsers Location header from response
145func headerLocationParser(resp *navigation.Response) (navigationRequests []*navigation.Request) {
146 header := resp.Resp.Header.Get("Location")
147 if header == "" {
148 return
149 }
150 navigationRequests = append(navigationRequests, navigation.NewNavigationRequestURLFromResponse(header, resp.Resp.Request.URL.String(), "header", "location", resp))
151 return
152}
153
154// headerRefreshParser parsers Refresh header from response
155func headerRefreshParser(resp *navigation.Response) (navigationRequests []*navigation.Request) {

Callers 1

TestHeaderParsersFunction · 0.85

Calls 2

StringMethod · 0.45

Tested by 1

TestHeaderParsersFunction · 0.68