Skip to content

HPE_INVALID_HEADER_TOKEN on 5.3.1 and 5.2.0 #813

@pineman

Description

@pineman

Hi!

Doing a simple HTTP.get("http://www.aplhealthcare.com.au") results in error reading from socket: Error Parsing data: HPE_INVALID_HEADER_TOKEN Invalid header value char (HTTP::SocketReadError) on 5.3.1 and 5.2.0, but NOT on 5.3.0. I'm using ruby 3.4.5.

I think it's due to the response's headers using \n instead of \r\n ("HTTP/1.1 301 Found\nDate: Fri Aug 1 23:02:05 2025\nServer: Redirector - NetRegistry Pty Ltd\nLocation: http://www.shop.livcor.com.au\nConnection: close\n\n\n", captured from parser.rb:29).
But something fishy is going on because on 5.3.0 this works fine, probably due to the native llhttp?

Another example is https://bydenergy.com. Would appreciate some guidance on why it works on 5.3.0 but not 5.3.1 or 5.2.0. I believe it works on 5.1.1 too. Thanks.

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