On Tue, 1 Nov 2011, Ludo Brands wrote:
On Tue, Nov 1, 2011 at 9:04 AM, Ludo Brands
wrote:
Note the "per the HTML specs". HTTP specs aren't that strict.
But what exaxtly do these specs ban? Because I am sending via
XMLHttpRequest in JavaScript, and there you can specify any
mime-type that y
On Tue, Nov 1, 2011 at 8:39 AM, Felipe Monteiro de Carvalho
wrote:
> begin
> SetLength(DataStr, M.Size);
> M.ReadBuffer(DataStr[1], M.Size);
> ContentFields.Text := DataStr;
> end;
Actually this code is wrong, for it to be proper it would need to
first check if the mime-type
> On Tue, Nov 1, 2011 at 9:04 AM, Ludo Brands
> wrote:
> > Note the "per the HTML specs". HTTP specs aren't that strict.
>
> But what exaxtly do these specs ban? Because I am sending via
> XMLHttpRequest in JavaScript, and there you can specify any
> mime-type that you want. You can send any d
On Tue, Nov 1, 2011 at 9:04 AM, Ludo Brands wrote:
> Note the "per the HTML specs". HTTP specs aren't that strict.
But what exaxtly do these specs ban? Because I am sending via
XMLHttpRequest in JavaScript, and there you can specify any mime-type
that you want. You can send any data and I haven't
> >> 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.
>
> They actually prohibit sending arbitrary data? oh, boy, these
> people like rules and inneficiency =D But there must be
> s
Hello,
Ok, it seams that I found a workaround. It works correctly if I use this:
lData := ARequest.Content;
instead of
lData := ARequest.ContentFields.Text;
It seams that the string is filled correctly, even if the TStringList
isn't filled.
I think this could be improved by adding this cod
2011/11/1 Felipe Monteiro de Carvalho :
> On Mon, Oct 31, 2011 at 7:30 PM, Michael Van Canneyt
> wrote:
>>> 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.
>
> They actually prohibit sen
On Mon, Oct 31, 2011 at 7:30 PM, Michael Van Canneyt
wrote:
>> 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.
They actually prohibit sending arbitrary data? oh, boy, these people
like rul
On 31.10.2011 19:30, Michael Van Canneyt wrote:
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 ?
Handler gets ContentType, transmitted data (the TMemoryStream) and the
ContentFie
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 proble
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 trye
On 10/31/2011 10:14, Felipe Monteiro de Carvalho wrote:
There is no form and no form data here. I want to pass raw data via
post. And yes, I checked that it is sent correctly.
Then your Content-Type header is neither "MULTIPART/FORM-DATA" nor
"APPLICATION/X-WWW-FORM-URLENCODED" when you use PO
There is no form and no form data here. I want to pass raw data via post.
And yes, I checked that it is sent correctly.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On 10/31/2011 08: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 trye
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
If I remove the line from JavaScript which sets the content type I just get:
exception at 0043004B: Unsupported content type: "text/plain; charset=UTF-8".
=/
--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
ht
Ok, the exception was a great addition =)
It corners the error here:
procedure TRequest.InitPostVars;
Var
M : TCapacityStream;
Cl : Integer;
B : Byte;
CT : String;
begin
{$ifdef CGIDEBUG}
SendMethodEnter('InitPostVars');
{$endif}
CL:=ContentLength;
M:=TCapacityStream.Create;
Tr
On Mon, Oct 31, 2011 at 4:23 PM, Michael Van Canneyt
wrote:
> Where is the action ? If you specify a module, then you must specify an
> action as well.
actions are not necessary. In my module there is a property
DefActionWhenUnknown=True (it is like this by default).
Also if this was the problem
On Mon, 31 Oct 2011, Felipe Monteiro de Carvalho wrote:
Hello,
So I advanced my CGI using HTTP GET so far, but I'd like to migrate to
HTTP POST. But I always get this error message in the apache logs:
Premature end of script headers: openpoker3.cgi, referer:
http://localhost:8080/cgi-bin/ope
Hello,
So I advanced my CGI using HTTP GET so far, but I'd like to migrate to
HTTP POST. But I always get this error message in the apache logs:
Premature end of script headers: openpoker3.cgi, referer:
http://localhost:8080/cgi-bin/openpoker3.cgi?module=MainPage
The request doesn't even get to
20 matches
Mail list logo