-
Notifications
You must be signed in to change notification settings - Fork 162
HTTP keepalive does not work by default #38
Comments
This looks like a pipeline issue. Would you mind doing a |
Odd about that highlighted thing. |
Putting this here for reference:
|
|
This is going to be a fun one. Thanks! |
|
Blammo: 3 == htparse_error_inval_reqline. Now we're getting somewhere. |
This is cropping up in many of my unit tests now; marking as critical. |
The following statement feels wrong because
The following simple patch seems to fix the problem. --- libevhtp-1.2.12-1.orig/evhtp.c
+++ libevhtp-1.2.12-1/evhtp.c
@@ -2217,7 +2217,7 @@ htp__connection_writecb_(struct bufferev
c->htp = orig_htp;
}
- htparser_init(c->parser, c->type);
+ htparser_init(c->parser, htp_type_request);
htparser_set_userdata(c->parser, c);
return; I'm happy, I've been stuck on this for a while, your comment really helped me. Is enabling debug documented somewhere? |
Not sure that above patch is the official fix since that function can be either client or server. type is defined in the constructor. I just added the debug option at the last release
And I'm adding more as I dig into this. |
Added more logging for this part; starting to come together.
|
Fix incoming. |
Lulz
|
Dear everyone, I am an idiot. This fixes Yellow-Camper#38 Yours, Nathan
Welp, there we go.
Thank you very much for the issue! |
This has been broken since the dawn of time by the way (and you were right) 👯♀️ |
Details
From looking at the code, HTTP keepalive should work automatically if supported by the client. It seems however that
evhtp_connection_free
is called from libevent before a response can be sent.Running in
gdb
,c->request->flags
seems to includeEVHTP_REQ_FLAG_KEEPALIVE
so I do not know what's wrong. I'm still searching.Context: I'm working on fixing haiwen/seafile#1119
Steps or code to reproduce the problem.
Please note below that
wget
is trying to reuse the TCP connection and fails because of no data received.Version
1.2.12-1
The text was updated successfully, but these errors were encountered: