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

Function headerContentLocationParser

pkg/engine/parser/parser.go:122–129  ·  view source on GitHub ↗

------------------------------------------------------------------------- Begin Header based parsers ------------------------------------------------------------------------- headerContentLocationParser parsers Content-Location header from response

(resp *navigation.Response)

Source from the content-addressed store, hash-verified

120
121// headerContentLocationParser parsers Content-Location header from response
122func headerContentLocationParser(resp *navigation.Response) (navigationRequests []*navigation.Request) {
123 header := resp.Resp.Header.Get("Content-Location")
124 if header == "" {
125 return
126 }
127 navigationRequests = append(navigationRequests, navigation.NewNavigationRequestURLFromResponse(header, resp.Resp.Request.URL.String(), "header", "content-location", resp))
128 return
129}
130
131// headerLinkParser parsers Link header from response
132func headerLinkParser(resp *navigation.Response) (navigationRequests []*navigation.Request) {

Callers 1

TestHeaderParsersFunction · 0.85

Calls 2

StringMethod · 0.45

Tested by 1

TestHeaderParsersFunction · 0.68