Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure that chunk buffer contains terminating HTTP newline

If sysread() returns content just short of the termination HTTP newline, then
the content of the chunk is removed from $chunk_buffer while eventually
leaving the HTTP newline. This breaks the invariant that $chunk_buffer will
always start with the size of the next chunk.
  • Loading branch information...
commit d2a5d157bfaf81ca9e70e3b8bb40977601122e2b 1 parent c80c7cb
@pmakholm pmakholm authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Starman/Server.pm
View
2  lib/Starman/Server.pm
@@ -406,7 +406,7 @@ sub _prepare_env {
if ($chunk_len == 0) {
last DECHUNK;
- } elsif (length $chunk_buffer < $chunk_len) {
+ } elsif (length $chunk_buffer < $chunk_len + 2) {
$chunk_buffer = $trailer . $chunk_buffer;
last;
}
Please sign in to comment.
Something went wrong with that request. Please try again.