Follow bytes->string returning a Result
- A device file whose document is not UTF-8 is an error: "the document in it is not UTF-8". - A page title that does not decode in its charset is read as Windows-1252, by matching the result rather than catching. - Hex digits, charset names and the tests' response heads are read with bytes->string/lossy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6fc668e908
commit
f7abd8ebe1
5 changed files with 8 additions and 7 deletions
|
|
@ -134,7 +134,7 @@
|
|||
(if (string-contains? seen "\r\n\r\n")
|
||||
(path-of seen)
|
||||
(match (read-some in)
|
||||
((Some bs) (go (str seen (bytes->string bs))))
|
||||
((Some bs) (go (str seen (bytes->string/lossy bs))))
|
||||
(None (path-of seen))))))
|
||||
|
||||
;; Waits `ms`, or less when the server stops.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue