Project

General

Profile

Actions

Bug #2566

closed

mod_fastcgi should handle "quick" responses

Added by stbuehler over 10 years ago. Updated over 8 years ago.

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

Description

mod_fastcgi fails if the fastcgi application closes the connection after sending a response without waiting for the request body.

For example libfcgi closes the connection after a 2 second timeout while reading after the response is sent:

select(5, [4], NULL, NULL, {2, 0})      = 0 (Timeout)
close(4)                                = 0

Such timeout can especially occur on slow (embedded) systems when lighttpd isn't able to read the POST data fast enough from the tmpfiles, or the system is generally busy otherwise.

For unix sockets we could handle EPIPE as indication for this; we should still be able to read the response after that. On TCP sockets we probably would get ECONNRESET, and reading might not work after that.

This means that mod_fastcgi should also select for read events on the socket while it is writing the request data (and therefore waiting for write events), which the current fdevent API cannot handle.


Related issues 1 (0 open1 closed)

Related to Bug #131: FastCGI FCGI_STDOUT before FCGI_STDIN bugFixedActions
Actions #1

Updated by gstrauss over 8 years ago

  • Related to Bug #131: FastCGI FCGI_STDOUT before FCGI_STDIN bug added
Actions #2

Updated by gstrauss over 8 years ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.x to 1.4.40
Actions #3

Updated by gstrauss over 8 years ago

  • Category set to mod_fastcgi
Actions #4

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