Bug #1258

don't send content length header

Added by Anonymous over 12 years ago. Updated almost 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Missing in 1.5.x:


I am using FastCGI and X-LIGHTTPD-send-file header to make lighty to send files with kernel sendfile. but lighty doesn't send Content-Length header. and it's ruble for us.

for example I can make stat to file and send this header manualy - but it will be double work and it's stupid.

is there any way to make lighty send Content-Length header when I use X-LIGHTTPD-send-file header from FastCGI aplication?

-- nagash


Updated by Anonymous over 12 years ago

I tried to add Content-Length header - but it didn't help.

-- lighttpd


Updated by Anonymous over 12 years ago

sorry - it's my foult - if I set Content-Length header manualy - it works. but it duble work with it. first is My FastCGI makes stat on file and next your Lighty make the same! is it possible to make lighty set proper headers?

-- lighttpd


Updated by darix over 12 years ago

the content length is not needed with x-sendfile responses as the file is send in chunked encoding anyway. in 1.5 the request is passed to mod_staticfile so you will get the content-length header for free.


Updated by darix over 12 years ago

i forgot to mention fixing this in 1.4 would mean some bigger structural changes. and dont think this is feasible.


Updated by jan over 12 years ago

  • Status changed from New to Fixed
  • Resolution set to wontfix

Updated by stbuehler over 11 years ago

  • Status changed from Fixed to Wontfix

Updated by gstrauss almost 4 years ago

  • Description updated (diff)

FYI: another option: mod_fastcgi supports an extension called X-Sendfile2 which does set Content-Length

Also available in: Atom