Ticket #755 (closed defect: fixed)

Opened 2 years ago

Last modified 18 months ago

206 partial response fails over fastcgi connection

Reported by: Maniac@… Owned by: jan
Priority: normal Milestone:
Component: core Version: 1.4.11
Severity: normal Keywords:
Cc: Maniac@… Blocked By:
Need User Feedback: Blocking:

Description

If a fastcgi app tries to output some lengthy response with 206 partial response status then lighty will eat just the first output buffer and then close the connection. Which basically means that 206 responses from fastcgi just don't work...

I've made some digging and found this at connection.c, line 287:

        case 206: /* write_queue is already prepared */
        case 302:
                con->file_finished = 1;
              
                break;

Disabling "con->file_finished = 1" for code 206 fixes the issue. However not knowing the code at all I don't know if it's actually correct. But just by looking at how things are named I think this should be like that. Because 302 responses really don't have a body but 206's do and pretty big one usually :-)

P.S. On a simingly related note I also changed my local mod_fastcgi.c all checks for 'http_status == 200' to check for all succesful codes (status >= 200 status < 300). I don't know if this helped anything, just making this note for completeness.

Attachments

Change History

Changed 19 months ago by darix

backport [1633]

Changed 18 months ago by darix

  • status changed from new to closed
  • resolution set to fixed

backported and tested.

Add/Change #755 (206 partial response fails over fastcgi connection)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.