Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Q: how to peek at incoming http requests in pipelined mode #138

Open
kamenl opened this issue Jul 3, 2019 · 0 comments
Open

Q: how to peek at incoming http requests in pipelined mode #138

kamenl opened this issue Jul 3, 2019 · 0 comments

Comments

@kamenl
Copy link

kamenl commented Jul 3, 2019

This is actually a question; asked on the libevent mailing list, but I was redirected here, and seems there is no separate list or forum for libevhtp. Might turn out to be a feature request...

Consider the following scenario:

  • Client side uses http pipelining and sends requests before waiting for the previous one to fully complete
  • Server side responds, but sometimes cannot respond right away, so I pause the connection for a while

From time to time, on the server side, while the connection has been paused and serving a previous request, I'd like to check if a new request has come over the wire; if not, I'd like to continue the paused state; if yes, I'd like to unpause, send a response and have the listener and parser accept the incoming request and go on about its business.

Is there a way to peek at the (paused) input pipe while not ruining the paused state's internal state (pardon the tautology)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant