mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 07:21:19 +00:00
fix httpclient.lastModified bad pattern in parsing (#12698)
This commit is contained in:
committed by
Andreas Rumpf
parent
5456da3ca9
commit
a114a40b57
@@ -230,7 +230,7 @@ proc lastModified*(response: Response | AsyncResponse): DateTime =
|
||||
## Raises a ``ValueError`` if the parsing fails or the value is not a correctly
|
||||
## formatted time.
|
||||
var lastModifiedHeader = response.headers.getOrDefault("last-modified")
|
||||
result = parse(lastModifiedHeader, "dd, dd MMM yyyy HH:mm:ss Z")
|
||||
result = parse(lastModifiedHeader, "ddd, dd MMM yyyy HH:mm:ss 'GMT'", utc())
|
||||
|
||||
proc body*(response: Response): string =
|
||||
## Retrieves the specified response's body.
|
||||
|
||||
Reference in New Issue
Block a user