Good time of day!
I found bug when I tryed to use outgoing http requests for getting
some data from remote servers (image/jpeg in my case).
I think that evcon->input_buffer must be copied to req->input_buffer,
before reading other data to req->input_buffer.
(I'm sorry if this is not new, i'm newby in this list)
There is a patch:
--- ./http.c.orig Sun Dec 3 00:30:04 2006
+++ ./http.c Wed Jan 24 20:37:27 2007
@@ -554,9 +555,6 @@
}
}
- /* hand what ever we read over to the request */
- evbuffer_add_buffer(req->input_buffer, evcon->input_buffer);
-
/* notify the user of the request */
(*req->cb)(req, req->cb_arg);
@@ -1063,8 +1061,11 @@
__func__, req->ntoread,
EVBUFFER_LENGTH(evcon->input_buffer)));
- if (req->ntoread > 0)
+ if (req->ntoread > 0) {
+ /* hand what ever we read over to the request */
+ evbuffer_add_buffer(req->input_buffer, evcon->input_buffer);
req->ntoread -= EVBUFFER_LENGTH(evcon->input_buffer);
+ }
if (req->ntoread == 0) {
evhttp_connection_done(evcon);
--
W/ best regards, Dmitry
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users