Ticket #794 (new defect)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: jabaltie@unimep.br Assigned to: jan
Priority: normal Milestone:
Component: mod_fastcgi Version: 1.4.11
Severity: normal Keywords:
Cc: Blocking:
Need Feedback:

Description (Last modified by moo)

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 !

Attachments

Change History

08/02/2006 05:36:13 AM changed by moo

  • description changed.

08/16/2006 07:40:02 PM changed by jabaltie@unimep.br

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.

09/08/2006 12:47:13 PM changed by eloy@debian.org

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."


Add/Change #794 (Problem on FastCGI protocol when using TCP/IP and large POST data)




Change Properties