Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-11

Troubles with CGI and POST content

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sven Barth

Hello together!

I'm working on a little personal website and encountered a very strange problem with the content that is sent by a form:

I run the attached CGI test application on my webspace which is a x86_64 Linux. When I enter text which contains a certain amount of characters/bytes into the textarea and submit that form, a part of the content seems to be truncated (all zeros) - this includes the name-value-pair of the submit button (which is sent after the textarea) so that the submit is not detected. It doesn't matter if my application is compiled for i386 or x86_64.

The problem doesn't appear when I run the app on my local servers (i386 Linux and Windows).

This "magical amount" is reached earlier when I use multi byte characters (e. g. umlauts).

What can be the problem? Can it be a configuration problem of Apache? (all three computers run Apache) Or is it a problem because the webspace has a different "library environment" than my local computers? (but the executable has no dependencies?!)

Regards,
Sven

Reply by email

Joost van der Sluis
to Sven Barth
Sven Barth wrote 10 lines
I run the attached CGI test application on my webspace which is a x86_64 Linux. When I enter text which contains a certain amount of characters/bytes into the textarea and submit that form, a part of the content seems to be truncated (all zeros) - this includes the name-value-pair of the submit button (which is sent after the textarea) so that the submit is not detected. It doesn't matter if my application is compiled for i386 or x86_64. The problem doesn't appear when I run the app on my local servers (i386 Linux and Windows).

Which fpc-version? Can you try with 2.4.0rc1?

Joost.

Reply by email

Sven Barth

Hi again!

Sorry, I forgot that... With all that Native NT and C++ linking stuff happening I'm only thinking in Trunk, currently ^^

I'm using 2.5.1 for the platforms i386- and x86_64-linux. On Windows I'm using 2.2.4.

Also I tested 2.4.0 now. Same results: troubles on Webhost, but no problems locally.

I now tested with 2.2.4 on Linux also. There the problem does not persist! - at least when I compile the example with i386, I didn't test with x86_64, because I didn't make the compiler for it.

Do you, Joost or anyone else have a clue where I could search for this regression/bug? Does it seem RTL or fcl-web related?

Regards,
Sven

Reply by email

Joost van der Sluis
to Sven Barth
Sven Barth wrote 17 lines
Hi again! Sorry, I forgot that... With all that Native NT and C++ linking stuff happening I'm only thinking in Trunk, currently ^^ I'm using 2.5.1 for the platforms i386- and x86_64-linux. On Windows I'm using 2.2.4. Also I tested 2.4.0 now. Same results: troubles on Webhost, but no problems locally. I now tested with 2.2.4 on Linux also. There the problem does not persist! - at least when I compile the example with i386, I didn't test with x86_64, because I didn't make the compiler for it. Do you, Joost or anyone else have a clue where I could search for this regression/bug? Does it seem RTL or fcl-web related?

I still have the attached patch lying around. It is a workaround and I still have to search for the real problem. But maybe it solves your problem. (Can you let me know if it does?)

Joost

Reply by email

Sven Barth

Hi again!

(So... let's see where this message ends up ^^)

I tested your patch (with both i386 and x86_64), Joost and as far as I can tell the problem is solved.

I'll check if I can spot the problem, too (I don't know when, though).

Regards,
Sven

Reply by email