Comments (6)
excellent minimal fix (if it works)
from simplehttp.
danger, danger!!! this is a good opt for low volume or simpleq mget
clients. however, it will increase latency, cpu and sockets in timed wait (
typically 2 * the MSL ).
from simplehttp.
ok the situation is becoming clearer: the bug with libevent-1.4 is that if the connection is keep-alive and the client closes it, it doesn't close the fd and clean up the resources related to the connection. (I was under the impression that HTTP/1.1 / keep-alive was generally buggy and we didn't really use it)
from simplehttp.
references for libevent-1.4 keep-alive fix strategies:
http://www.mail-archive.com/[email protected]/msg01721.html
http://www.mail-archive.com/[email protected]/msg01722.html
from simplehttp.
btw, my latest fix, in libevent-1.4.14b:
diff -urp libevent-1.4.14b-stable/http.c libevent-1.4.14b-stable-fix/http.c
--- libevent-1.4.14b-stable/http.c 2010-06-20 09:06:04.000000000 -0400
+++ libevent-1.4.14b-stable-fix/http.c 2012-05-09 14:51:37.000000000 -0400
@@ -2231,6 +2231,7 @@ evhttp_handle_request(struct evhttp_requ
if (req->uri == NULL) {
event_debug(("%s: bad request", __func__));
if (req->evcon->state == EVCON_DISCONNECTED) {
+ req->userdone = 1;
evhttp_connection_fail(req->evcon, EVCON_HTTP_EOF);
} else {
event_debug(("%s: sending error", __func__));
from simplehttp.
Closing (we're attempting to push libevent changes upstream)
from simplehttp.
Related Issues (20)
- when installing module gcc complains 'undefined reference to `current_base`' in simplehttp.c HOT 2
- ps_to_file , segfault on directory not existing or improper permissions
- ps_to_http should take a verbose param to enable/disable request logging
- Add mput call to simplequeue
- simpleleveldb does not correctly state Content-Type
- simplequeue page alloc
- simplehttp closecb for async handlers
- pubsub leaves many file descriptors open HOT 1
- simpleleveldb leak in fwmatch_cb() HOT 1
- simpleleveldb /fwmatch /range_match /mget only support json format HOT 1
- simpleleveldb /mput could write some records then return error HOT 1
- simpleleveldb json format transitions HOT 4
- simplehttp async connection pool freeing HOT 1
- queuereader lib should handle heartbeat HOT 3
- queuereader lib takes an errorcb and never calls it
- Update pysimplehttp HOT 1
- Mac compatability in makefile HOT 1
- undefined reference to 'json_object_new_string' HOT 2
- ps_to_http results in "ERROR: request failed"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simplehttp.