Hi, All:

Please endure my first post to this knowledgable email-group..:-)

On 5/23/07, Gareth Kirwan <[EMAIL PROTECTED]> wrote:
> This is what I currently use for a few mason implementations:
>
> It depends on your environment as to what you can do.
> Apache/mod_perl has an easier way of doing it than CGI/FCGi, which uses
> FakeApache.
> As you can see from the comment, since FakeApache implements read, I
> couldn't get it to be completely dynamic:
>
> my $inputText;
> # FakeApache implements read, so we can't automatically tell if we're in
> mod_perl or FCGI
> if (0 && $r->can('read')){


Just out of my curiosity, may you please tell me why you would use the
'if' clause this way. It seems to me if (0 && $r->can('read')) always
return false... am I understanding wrong somewhere?? or what does the
zero before '&&' do??

Thank you very much,
Lihao.


>        $r->read( $inputText, $r->headers_in->{'Content-length'} );
>        }
> else {
>        my %params = $r->params;
>        my $posted_content = $params{POSTDATA} || $params{keywords};
>        $posted_content ||= join '', %params if ($r->method eq 'POST');
>        $posted_content = join '', @$posted_content if (ref $posted_content
> eq 'ARRAY');
>        $inputText = $posted_content
>        }
>
> Regards
>
> Gareth
>
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED] On Behalf
> >Of Emmanuel Lacour
> >Sent: 23 May 2007 09:41
> >To: mason-users@lists.sourceforge.net
> >Subject: [Mason] Getting the raw POST content
> >
> >
> >Hi,
> >
> >I try to get the raw content of a POST in a mason component, but I
> >cannot find a way to do this in the documentation. Is this possible?
> >
> >(the content is an XML)
> >
> >Thanks for any help :)
> >
> >--
> >Emmanuel Lacour
> >
> >---------------------------------------------------------------
> >----------
> >This SF.net email is sponsored by DB2 Express
> >Download DB2 Express C - the FREE version of DB2 express and take
> >control of your XML. No limits. Just data. Click to get it now.
> >http://sourceforge.net/powerbar/db2/
> >_______________________________________________
> >Mason-users mailing list
> >Mason-users@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/mason-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to