Mailing List Archive

dumping the params,headers and so on..
hi,

I'm tring to dump the headers and the whole conents as it is recieved from the ASP.pm.
The reason !! I'm tring to build a more interactive app using javascript-xmlhttp object
(i.e. building the POST request from the client-side form).

When I try this with pure perl script it works, but with ASP.pm I doesnt recieve anything
in $$Request{Params}.
That is why I want to dump the post-request as it is recieved by ASP.pm

any idea why it works in pure CGI.pm script but not with ASP.pm.

tia

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: dumping the params,headers and so on.. [ In reply to ]
ok, I found it i.e. $Request->BinaryRead(), it shows what I expected i.e.
the request i sent :

param1=value1

but it was not in $$Request{Params}, did I miss something !!
here is the code..

$Response->Write( Dumper $$Request{Params} );
$Response->Write( $Request->BinaryRead() );

and the dump :

$VAR1 = bless( {}, 'Apache::ASP::Collection' );
name=test


|hi,
|
|I'm tring to dump the headers and the whole conents as it is recieved from the ASP.pm.
|The reason !! I'm tring to build a more interactive app using javascript-xmlhttp object
|(i.e. building the POST request from the client-side form).
|
|When I try this with pure perl script it works, but with ASP.pm I doesnt recieve anything
|in $$Request{Params}.
|That is why I want to dump the post-request as it is recieved by ASP.pm
|
|any idea why it works in pure CGI.pm script but not with ASP.pm.
|
|tia

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: dumping the params,headers and so on.. [ In reply to ]
I found the problem the Request.pm matches form-header like this (by memory) ::

if($header_in->get('Content-type') eq 'application/form-urlencoded') { ..... <--or so

but I'm sending :

application/form-urlencoded;charset=win-1251

so I modified it like this :

if($header_in->get('Content-type') =~ m!^application/form-urlencoded!) { .....

Not sure if Request.pm has to be modified, that is why I'm posting it :")

...

|ok, I found it i.e. $Request->BinaryRead(), it shows what I expected i.e.
|the request i sent :
|
|param1=value1
|
|but it was not in $$Request{Params}, did I miss something !!
|here is the code..
|
|$Response->Write( Dumper $$Request{Params} );
|$Response->Write( $Request->BinaryRead() );
|
|and the dump :
|
|$VAR1 = bless( {}, 'Apache::ASP::Collection' );
|name=test
|
|
||hi,
||
||I'm tring to dump the headers and the whole conents as it is recieved from the ASP.pm.
||The reason !! I'm tring to build a more interactive app using javascript-xmlhttp object
||(i.e. building the POST request from the client-side form).
||
||When I try this with pure perl script it works, but with ASP.pm I doesnt recieve anything
||in $$Request{Params}.
||That is why I want to dump the post-request as it is recieved by ASP.pm
||
||any idea why it works in pure CGI.pm script but not with ASP.pm.
||
||tia
|

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org