Skip to content

Error responses written twice #3307

@nateberkopec

Description

@nateberkopec

For example, for a parser error:

assert_equal "HTTP/1.1 400 Bad Request\r\nConnection: close\r\nContent-Length: 0\r\n\r\n", data

doesn't pass, because the actual response is:

"HTTP/1.1 400 Bad Request\r\nConnection: close\r\nContent-Length: 0\r\n\r\nHTTP/1.1 400 Bad Request\r\n\r\n"

The problem comes from prepare_response and client.write_error essentially trying to do the same thing. We should fix this overlap of responsbilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions