Skip to content

Improper message termination on half-closed socket #140

Closed
@kenballus

Description

@kenballus

When WEBrick receives a request with no message body that is missing the final CRLF pair after the headers, and then the connection is closed for writing by the client, WEBrick responds to the request as though it were complete.

For example, if WEBrick receives the following request, (notice the missing final CRLF)

GET / HTTP/1.1\r\n
Host: whatever\r\n

and the client then half-closes the socket, WEBrick will still respond to the request. This request should be considered incomplete and rejected. This is what nearly every other HTTP implementation does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions