r0wbrt / advertsieve

Transparent proxy server for content policy management
Other
1 stars 0 forks source link

Proxy should abort the request if the client aborts the request. #22

Closed r0wbrt closed 6 years ago

r0wbrt commented 6 years ago

Proxy should abort the request when the client closes the request. Right now, it does not do that meaning the proxy is vulnerable to DOS attacks where a malicious client sends a large number of requests, and then closes them. These requests can be to a really slow http server causing the proxy to waste resources on an aborted request. The default implementation of http writer supports functionality for notifying consuming code that the client has closed the connection. However, this only works if the entire request body has been consumed which the proxy does not do for performance reasons.