-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
HTTP::Message in Str method is silently appending EOL:
This causes Content-Length calculated by user to be incorrect:
$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?
Metadata
Metadata
Assignees
Labels
No labels