Skip to content

Commit

Permalink
added check for Accept header in Response.Request
Browse files Browse the repository at this point in the history
  • Loading branch information
k4lizen committed Oct 17, 2023
1 parent e08409f commit a485676
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions colly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,13 @@ func TestNoAcceptHeader(t *testing.T) {
r.Headers.Del("Accept")
})

c.OnResponse(func(r *Response) {
ret := r.Request.Headers.Get("Accept")
if ret != "" {
t.Error("Failed to pass request with no Accept header.")
}
})

c.Visit(ts.URL)
}

Expand Down

0 comments on commit a485676

Please sign in to comment.