Project

General

Profile

Actions

Feature #2313

closed

[PATCH] X-sendfile support for mod_cgi

Added by Max_nl over 13 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
Normal
Category:
mod_cgi
Target version:
ASK QUESTIONS IN Forums:

Description

Attached a patch to add x-sendfile support to mod_cgi.
Works the same as with Fastcgi.


Files

cgi_x-send-file.patch (4.79 KB) cgi_x-send-file.patch Max_nl, 2011-05-08 19:03
Actions #1

Updated by Max_nl over 13 years ago

Same patch but in unified format (forgot the -u option).

Actions #2

Updated by stbuehler over 13 years ago

  • File deleted (cgi_x-send-file.patch)
Actions #3

Updated by stbuehler over 13 years ago

  • Target version changed from 1.4.29 to 1.4.x

Hm. I don't think it is worth it to add more complexity to mod_cgi (especially as the more powerful variant of x-sendfile is missing).

I recommend using fcgi-cgi instead; it comes with the bonus that you can run the scripts with a different user easily.
That way, your cgi apps would look like FastCGI to lighty.

Actions #4

Updated by Max_nl over 13 years ago

stbuehler wrote:

I recommend using fcgi-cgi instead; it comes with the bonus that you can run the scripts with a different user easily.
That way, your cgi apps would look like FastCGI to lighty.

It's for an embedded application where memory use is an issue.
Having to install spawn-fci, fcgi-cgi and libev just to be able to serve files, isn't going to help with that.

mod_cgi without x-sendfile is pretty worthless. Serve a file through a script that is larger than the device memory and it crashes due to lighttpd's tendency to buffer script output indefinitely.

Actions #5

Updated by stbuehler over 13 years ago

spawn-fcgi is not a memory issue (it is only a spawn helper and doesn't keep running), and mod_cgi needs memory too. i doubt there will be a big difference.

if you prefer using your patch that is fine ofc, but i don't want to maintain another copy of x-sendfile.

Actions #6

Updated by nitrox over 13 years ago

  • Status changed from New to Wontfix
Actions #7

Updated by stbuehler over 13 years ago

  • Target version deleted (1.4.x)
Actions #8

Updated by gstrauss over 8 years ago

  • Status changed from Wontfix to Patch Pending
  • Target version set to 1.4.40
Actions #9

Updated by gstrauss over 8 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom