[fpc-pascal] Premature end of headers using fcl-web and POST
Michael Van Canneyt
michael at freepascal.org
Mon Oct 31 19:30:05 CET 2011
On Mon, 31 Oct 2011, Sven Barth wrote:
> On 31.10.2011 16:56, Felipe Monteiro de Carvalho wrote:
>> Ok, I figured part of it out. I can get past the exception if I use 2.5.1
>>
>> And the action was necessary, which is really strange because it
>> worked nicely without it when using GET
>>
>> But now my problem is that I cannot get my POST data. I tryed this so far:
>>
>> lData := ARequest.ContentFields.Text;
>>
>> but it is empty.
>>
>
> If you'd look at the current version of TRequest.InitPostVars, you'd know why
> it is empty ;)
[snip]
> === source end ===
>
> So it seems that you MUST set the contenttype either to MULTIPART/FORM-DATA
> or APPLICATION/X-WWW-FORM-URLENCODED.
>
Yes, this is as per the HTML specs.
> Maybe TRequest should be extended by something like an "unknown content type
> handler"...
This can of course be done, the question is what this handler should do ?
Michael.
More information about the fpc-pascal
mailing list