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

Method AbsoluteURL

pkg/navigation/response.go:47–62  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

45}
46
47func (n Response) AbsoluteURL(path string) string {
48 if strings.HasPrefix(path, "#") {
49 return ""
50 }
51
52 absURL, err := n.Resp.Request.URL.Parse(path)
53 if err != nil {
54 return ""
55 }
56 absURL.Fragment = ""
57 if absURL.Scheme == "//" {
58 absURL.Scheme = n.Resp.Request.URL.Scheme
59 }
60 final := absURL.String()
61 return final
62}
63
64func (n Response) IsRedirect() bool {
65 return n.StatusCode >= 300 && n.StatusCode <= 399

Callers 3

bodyFormTagParserFunction · 0.80
bodyHtmxAttrParserFunction · 0.80

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected