Mailing List Archive

embperl with stack handlers ?
Sorry the config is this ....
----
Hi,

I had develop a mod_perl module , checkdevice , for make checking before call to embperl ,

I put :

<Files *.wpl>
SetHandler perl-script
PerlHandler Apache::OutputChain HTML::Embperl checkdevice
Options ExecCGI
</files>

If checkdevice don't go to next handler(EmbPerl) all work ( generate output and DONE)

But if EmbPerl execute then the ouput is generate but with a extra header ...

------------------------- ******************** -----------------------
Date: Wed, 02 Aug 2000 21:58:00 GMT
Server: Apache/1.3.9 (Unix) (Red Hat/Linux) mod_perl/1.22 PHP/3.0.14
Content-Length: 734
Connection: close
Content-Type: text/vnd.wap.wml


<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
......
</wml>


HTTP/1.1 200 OK
Date: Wed, 02 Aug 2000 21:58:00 GMT
Server: Apache/1.3.9 (Unix) (Red Hat/Linux) mod_perl/1.22 PHP/3.0.14
Allow: GET, HEAD, OPTIONS, TRACE
Connection: close
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>200 OK</TITLE>
</HEAD><BODY>
<H1>OK</H1>
The requested method POST is not allowed for the URL /wapcity/i.wpl.<P>
</BODY></HTML>

----------------- ******************* ------------------------------------

which is the correct method for handle this ?

than in advance ....

http://www.chilewap.cl/"]
Re: embperl with stack handlers ? [ In reply to ]
Hi,
>
> I had develop a mod_perl module , checkdevice , for make checking before
call to embperl ,
>
> I put :
>
> <Files *.wpl>
> SetHandler perl-script
> PerlHandler Apache::OutputChain HTML::Embperl checkdevice
> Options ExecCGI
> </files>
>
> If checkdevice don't go to next handler(EmbPerl) all work ( generate
output and DONE)
>
> But if EmbPerl execute then the ouput is generate but with a extra header
...
>

Your checkdevice handler should not send any HTTP headers (of course it can
modifiy and setup header values). Embperl then sends the headers. (Otherwise
Embperl cannot add things like Content-Lenght etc.)

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: embperl with stack handlers ? [ In reply to ]
Hi ,

I think my problem is with the read of post data in
the first module. EmbPerl try to read input for put values
in %fdat ... values that I need ...

How can pass the post data to next handler without
problems to next handler ?


I use OutputChain but don't work or Is bad used ....


Your checkdevice handler should not send any HTTP headers (of course it can
modifiy and setup header values). Embperl then sends the headers. (Otherwise
Embperl cannot add things like Content-Lenght etc.)

Yes I sent http headers in bad place .... for case of done ....

thanks in advance ...

----------------




At 05:57 AM 8/3/2000 +0200, Gerald Richter wrote:
Hi,
>
> I had develop a mod_perl module , checkdevice , for make checking before
call to embperl ,
>
> I put :
>
> <Files *.wpl>
> SetHandler perl-script
> PerlHandler Apache::OutputChain HTML::Embperl checkdevice
> Options ExecCGI
> </files>
>
> If checkdevice don't go to next handler(EmbPerl) all work ( generate
output and DONE)
>
> But if EmbPerl execute then the ouput is generate but with a extra header
...
>

Your checkdevice handler should not send any HTTP headers (of course it can
modifiy and setup header values). Embperl then sends the headers. (Otherwise
Embperl cannot add things like Content-Lenght etc.)

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de     /"]http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------


http://www.chilewap.cl/"]
Re: embperl with stack handlers ? [ In reply to ]
> How can pass the post data to next handler without
>problems to next handler ?

One solution would be to put them in a global or in $r -> pnotes and get
them from there in your page. Addionaly set optDisableFormData = 256 so
Embperl will not reread the formdata. You also may setup the enviroment
QUERY_INFO to convert it to a GET request (and set CONTENT_LENGTH to zero)

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: embperl with stack handlers ? [ In reply to ]
At 09:53 PM 8/7/2000 +0200, Gerald Richter wrote:

> How can pass the post data to next handler without
>problems to next handler ?

One solution would be to put them in a global or in $r -> pnotes and get
them from there in your page. Addionaly set optDisableFormData = 256 so
Embperl will not reread the formdata.



You also may setup the enviroment
QUERY_INFO to convert it to a GET request (and set CONTENT_LENGTH to zero)

Ok, this is more easy and transparent way .... !!!

thanks !!

http://www.chilewap.cl/"]