> mod_proxy does not send a Content-Length header, seems because of the > flush bucket inserted by ap_proxy_http_process_response() > > if i break in ap_content_length_filter, when a request is handled by > default_handler, brigade looks like so: > (gdb) dump_brigade b > dump of brigade 0x8235318 > 0: bucket=FILE(0x8238c28), length=26, data=0x8238c78 > 1: bucket=EOS(0x822e998), length=0, data=0x0 > > here's what it currently looks like when handled by the proxy: > (gdb) dump_brigade b > dump of brigade 0x82310a8 > 0: bucket=HEAP(0x822e998), length=26, data=0x8238c28 > 1: bucket=FLUSH(0x8218ea8), length=0, data=0x0 > (gdb) dump_brigade b > dump of brigade 0x82310a8 > 0: bucket=EOS(0x8238c28), length=0, data=0x0 > > if i remove the flush bucket (patch below), then proxy requests do get a > Content-Length header. doesn't seem like proxy should be flushing to > begin with. thoughts?
The proxy should flush, because otherwise the data won't stream to the client. The problem that I see, is that the proxy shouldn't be removing the C-L from the response that the origin server provided. If you can get a C-L by removing the flush bucket, then the C-L filter is the thing providing the header data. But, we have a C-L from the origin server, so we should just use that C-L. Ryan