I am try to use mod_proxy to proxy a Windows Media stream on HTTP protocol that generate by Windows Media Service. This is a typical Keep-alive stream. I use Windows Media Player as the client and mod_proxy on Apache2.0.52 get stream data from remote stream server, and pass it to player via HTTP also. It works very well. But when I shutdown the media player, the mod_proxy still connect to the remote stream server, and retrive data as before. And, the error.log grows at at a about 18KB/s speed. All the error like: XXXXXXXX info (OS 10053)xxxxxxxxxxxxxxxxx core_output_filter: writing data to the network It seems that mod_proxy does not know the client is shutdown and still try to feed data to client. And, as new access entered, the mod_proxy will open a new session to stream server, and after user shutdown, the connection to stream server is still alive. After servral times, I have to stop the Apache.
> And, the error.log grows at at a about 18KB/s speed. Sorry, it should be 18KB/min. (In reply to comment #0)
I had the same problem and I did some debugging. This happends because ap_pass_brigade returns always APR_SUCCESS on ap_proxy_http_process_response (from server/core.c). here is a quick patch for this: change line if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS) { on file modules/proxy/proxy_http.c to: if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS || c->aborted) {
*** Bug 29644 has been marked as a duplicate of this bug. ***
Thanks for the patch. I added the same logic in two other places where it was also needed and committed that. http://svn.apache.org/viewcvs?view=rev&rev=125612 [viewsvn currently disabled]
Created attachment 14046 [details] backported patch backported version of patch for submission to 2.0
*** Bug 39442 has been marked as a duplicate of this bug. ***