Project

General

Profile

Actions

Feature #2253

closed

scgi x-sendfile

Added by jroll about 14 years ago. Updated over 8 years ago.

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

Description

I have copied some code from mod_fastcgi.c in to mod_scgi.c to allow the X-Sendfile header to work. Since I know nothing about lighttpd internals this is just a shot in the dark, but it does seem to send the correct data to my browser.

One issue I've discovered is that if the file lookup with stat_cache_get_entry fails, the server sends an empty file, not a 502 error code as intended.

Anyway this is a start. If someone familiar with lighttpd/scgi would like to give feedback I'd be happy to revise the patch as needed.

diffs against lighttpd-1.4.27

Thanks,

john


Files

mod_scgi.c-xsendfile-patch (3.67 KB) mod_scgi.c-xsendfile-patch jroll, 2010-08-26 15:36

Related issues 1 (0 open1 closed)

Related to Feature #2017: X-Sendfile handoff to mod-static-file in 1.4.xFixed2009-07-01Actions
Actions #1

Updated by Olaf-van-der-Spek about 14 years ago

jroll wrote:

One issue I've discovered is that if the file lookup with stat_cache_get_entry fails, the server sends an empty file, not a 502 error code as intended.

Didn't that get fixed in FastCGI recently?

Actions #2

Updated by jroll about 14 years ago

I see that something like this was fixed for fastcgi in #2226. I don't know how to see the code changes that were applied of fix this.

I tried setting cos->parsed_response |= HTTP_STATUS; but this didn't seem to help.

John

Actions #4

Updated by arteymix almost 9 years ago

What is the state of X-Sendfile with mod_scgi?

It still does not work with 1.4.39.

Actions #5

Updated by gstrauss over 8 years ago

  • Related to Feature #2017: X-Sendfile handoff to mod-static-file in 1.4.x added
Actions #6

Updated by gstrauss over 8 years ago

  • Status changed from New to Patch Pending
  • Target version set to 1.4.40
Actions #7

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