forked from gocolly/colly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix default User-Agent when using custom headers
When using non-nil hdr parameter with c.Request method, and not setting User-Agent header explicitly, it would be left unset (when it should've been set to c.UserAgent). This means that Go HTTP client would use the default "Go-http-client/2.0" string. Suppressing the header altogether is still possible by setting it to empty string.
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters