Skip to content

Finished callback? #46

@andrew-aladev

Description

@andrew-aladev

I am using http parser with read_nonblock. I've obtained a timeout or eof exceptions. I was image that on_message_complete is a callback and it will be fired when the request or response has finished. But I was wrong.

it "should abort parser via header complete callback without a body" do
  "GET / HTTP/1.0\r\n" +
  "Content-Length: 0\r\n" +
  "\r\n"
  ...
  expect(@body).to be_empty
  expect(@done).to be false

I have more absurd:

HTTP/1.1 200 Connection established\r\n
Connection: close\r\n
\r\n

The headers has finished but the message hasn't finished. What are you waiting for? Connection has been already closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions