Comments (6)
The command wrk -t 5 -c100 -d15 url
on a small file gives a lot of 500 codes probably because of this.
from tiny_httpd.
I think it's good to close the connection if an option is set (--no-connection-reuse
or whatever). Otherwise, a client might send another query. We might be able to set a timeout on how long it takes to send the new query, I'm not sure.
We have problems with slow lorris and other things, I'm afraid. In general it's going to be hard to be iron solid. A reverse proxy should be the way to do that cleanly if you're exposed to the public internet, and it can also handle TLS.
from tiny_httpd.
I don't understand ? What is slow lorris ? It does not seem costly to close the stream ? I don't speak about the connection socket, but the stream of the file being send over the socket. I just submitted PR #55, which is rather trivial.
from tiny_httpd.
Without this PR #55, a long running connection downloading many files will fail with EMFILE (no more file descriptor).
It is quite strange that this bug was not detected actually.
from tiny_httpd.
https://en.wikipedia.org/wiki/Slowloris_(computer_security)
but here you're talking about the stream in a response, which is not closed after being written back to the client, is that it? I guess it can be a leak indeed. I'm not sure why it did not pop up before; maybe we only did load testing with a server that didn't use streams with underlying FDs.
from tiny_httpd.
I think this is fixed by #55
from tiny_httpd.
Related Issues (20)
- Problem with mime type of css and js files HOT 4
- Function `percent_decode` should not convert the `+` symbol HOT 2
- session and handling of body in post method HOT 7
- Unix.accept raising exception, not caught HOT 3
- Provide some level of statistics ? HOT 8
- test server sent events
- more serious testing HOT 4
- Better data structure for headers HOT 4
- Middleware and accept overlap a bit ? Need more freedom for composition ? HOT 2
- Should use magic-mime (or mrmime) HOT 2
- Small file should not be chunked HOT 5
- missing code for trailer in chunked message HOT 3
- Accept-encoding and chunked response HOT 2
- handling of route HOT 11
- Firefox hang on 301 redirect with no body HOT 2
- Make client_addr of Request.t public HOT 8
- use autobahn to test websocket implem
- bug in compressed output streams with iostream 0.2
- Invalid_argument("Unix.sigprocmask not implemented") on Windows
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 tiny_httpd.