Skip to content

Commit

Permalink
- FIX: CRLF after the last HTTP chunk is now optional
Browse files Browse the repository at this point in the history
  • Loading branch information
iarwain committed Dec 7, 2024
1 parent 24556ad commit b6d4440
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mezz/prot-http.reb
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ check-data: func [port /local headers res data available out chunk-size pos trai

if state/chunk-size [
;- rests from previous unfinished chunk
either state/chunk-size <= available [
either state/chunk-size < available [
; we have enough data to end the chunk
append out take/part data state/chunk-size
state/chunk-size: none
Expand Down Expand Up @@ -617,7 +617,7 @@ check-data: func [port /local headers res data available out chunk-size pos trai
true ; end of loop
][
available: length? data
either chunk-size <= available [
either chunk-size < available [
append out take/part data :chunk-size
if crlfbin <> take/part data 2 [
throw-http-error port "Missing CRLF after chunk end!???"
Expand Down

0 comments on commit b6d4440

Please sign in to comment.