Project

General

Profile

Actions

Bug #794

closed

Problem on FastCGI protocol when using TCP/IP and large POST data

Added by Anonymous over 18 years ago. Updated over 16 years ago.

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

Description

When submiting a form, POST method, with a large amount of data, the FCGI_STDIN record type has a wrong content length field.

To reproduce the problem :

1) Set up Lighty to use an external FastCGI server, configured like this (or similar to it) :


 fastcgi.server             = ( ".wsa" =>
                                (("host"                  => "127.0.0.1" 
                                 ,"port"                  => 101
                                 ,"mode"                  => "responder" 
                                 ,"check-local"           => "disable" 
                                 ,"allow-x-send-file"     => "enable" 
                                 ,"broken-scriptfilename" => "enable" 
                                ))
                             )

2) Put your backend server to run (and listen tcp/ip connections). Start lighty as well, of course.

3) Make a html form with a TEXTAREA. Important : POST method. Feed in a little bit of data (say 500 bytes) into the TEXTAREA and submit. It will go on OK.

4) Now enlarge that TEXTAREA by feeding say 80k characters. Submit and check how the external backend server will behave.

My understanding is that under these circumstances (large data), the content length field of FCGI_STDIN record is wrongly formatted.

Notice that I have made the same tests over Apache and it works OK. That is, same backend server, same html form, same amount of data. Everything works as expected.

When we switch to Lighty however, we have that problem on the content length field.

Also using Lighty either with GET or POST but smaller data, it works OK.

I'm running on Windows, although I think this problem will happen everywhere.

Thanks !

-- jabaltie

Actions #1

Updated by Anonymous over 18 years ago

I have found the problem. It's not on Lighty.

The problem is that I was using a very little internal buffer for SocketRecv.

After I enlarged this internal buffer of my own, it started to work OK.

However, because Apache uses little blocks to transmit data, the problem did not seem to happen with it, whereas Lighty uses larger blocks (I do prefer it).

This ticket should be closed.

Thanks and sorry for the inconvenience.

-- jabaltie

Actions #2

Updated by Anonymous over 18 years ago

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=386520

user report:

"After upgrading to 1.4.12~20060907-1 POST request to PHP5 scripts
running through FastCGI lead to timeout or take incredibly long and PHP
script doesn't seem to get POST variables.

I downgraded back to 1.4.11-7 and it seems to work fine now, so I expect
the problem is in lighttpd.

I'm not able to produce problem with same configuration on i386 so the
problem might be amd64 only."

-- eloy

Actions #3

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid
Actions #4

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom