Skip to content

Commit

Permalink
Fix #22862 - change the httpclient user-agent to be valid spec-wise
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil Yarantsev (Yardanico) committed Oct 29, 2023
1 parent fbc801d commit 9f13a3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Changes affecting backward compatibility

- `-d:nimStrictDelete` becomes the default. An index error is produced when the index passed to `system.delete` was out of bounds. Use `-d:nimAuditDelete` to mimic the old behavior for backwards compatibility.
- The default user-agent in `std/httpclient` has been changed to `Nim-httpclient/<version>` instead of `Nim httpclient/<version>` which was incorrect according to the HTTP spec.

## Standard library additions and changes

Expand Down
2 changes: 1 addition & 1 deletion lib/pure/httpclient.nim
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ type
## and `postContent` proc,
## when the server returns an error

const defUserAgent* = "Nim httpclient/" & NimVersion
const defUserAgent* = "Nim-httpclient/" & NimVersion

proc httpError(msg: string) =
var e: ref ProtocolError
Expand Down

0 comments on commit 9f13a3b

Please sign in to comment.