Skip to content

Stop reading from the socket after sending a '400 Bad request' #1223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2017

Conversation

deweerdt
Copy link
Member

@deweerdt deweerdt commented Mar 8, 2017

When sending a '400 Bad request', stop reading from the socket. Not
doing so risks having handle_incoming_request being called a second
time, and assert because a write is already scheduled:

do_write                h2o/lib/common/socket/evloop.c.h:257:5
h2o_socket_write        h2o/lib/common/socket.c:576:9
send_bad_request        h2o/lib/http1.c:413:5
handle_incoming_request h2o/lib/http1.c:490:13
reqread_on_read         h2o/lib/http1.c:506:9
read_on_ready           h2o/lib/common/socket/evloop.c.h:235:5

deweerdt added 2 commits March 8, 2017 08:27
When sending a '400 Bad request', stop reading from the socket. Not
doing so risks having `handle_incoming_request` being called a second
time, and assert because a write is already scheduled:

```
do_write                h2o/lib/common/socket/evloop.c.h:257:5
h2o_socket_write        h2o/lib/common/socket.c:576:9
send_bad_request        h2o/lib/http1.c:413:5
handle_incoming_request h2o/lib/http1.c:490:13
reqread_on_read         h2o/lib/http1.c:506:9
read_on_ready           h2o/lib/common/socket/evloop.c.h:235:5
```
@kazuho kazuho merged commit 3574652 into h2o:master Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants