Skip to content

Commit

Permalink
Merge pull request #254 from projectdiscovery/bugfix-websocket-dump
Browse files Browse the repository at this point in the history
Adding support for more edge cases
  • Loading branch information
ehsandeep authored Apr 29, 2021
2 parents 1b2e227 + c304b78 commit 7e459a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/httputilz/httputilz.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func DumpRequest(req *retryablehttp.Request) (string, error) {
// DumpResponseHeadersAndRaw returns http headers and response as strings
func DumpResponseHeadersAndRaw(resp *http.Response) (header, response string, err error) {
// httputil.DumpResponse does not work with websockets
if resp.StatusCode == http.StatusContinue {
if resp.StatusCode >= http.StatusContinue || resp.StatusCode <= http.StatusEarlyHints {
raw := resp.Status + "\n"
for h, v := range resp.Header {
raw += fmt.Sprintf("%s: %s\n", h, v)
Expand Down

0 comments on commit 7e459a6

Please sign in to comment.