Open bbkr opened 5 years ago
HTTP::Message in Str method is silently appending EOL:
https://github.com/sergot/http-useragent/blob/cfdfc48c55d312049f90f1db61042718c1de9908/lib/HTTP/Message.pm6#L231
This causes Content-Length calculated by user to be incorrect:
Content-Length
$response = HTTP::Response.new; $response.set-code( 200 ); my $content = 'foo'; # 3 bytes $response.add-content( $content ); $response.field( Content-Length => $content.encode.bytes ); $socket.print( $response.Str ); # will send 2 bytes more than declared
Why is this EOL appended? User content should not be tampered with. Is this behavior described somewhere in RFC?
Can this please be fixed? Firefox Web Driver isn't handling the extra EOL.
HTTP::Message in Str method is silently appending EOL:
https://github.com/sergot/http-useragent/blob/cfdfc48c55d312049f90f1db61042718c1de9908/lib/HTTP/Message.pm6#L231
This causes
Content-Length
calculated by user to be incorrect:Why is this EOL appended? User content should not be tampered with. Is this behavior described somewhere in RFC?