>         Hello all,
>
> 2 Questions about Embperl (If it's not the right place to do so,
> please tell
> me; I didn't find anything more specifically related to Embperl...)
>

the place is ok.

> First, it seems Embperl doesn't know about <input type=image ...>
> fields in
> forms; Browsers that find them generate "x" and "y" fields (or
> "fieldname.x"
> and "fieldname.y", if a field name is given... Take note that few
> non graphical
> browsers generate a "fieldname" field instead in that case), and Embperl
> doesn't add those fields to %idat (can be a problem in some
> cases, for example
> if you use [$ hidden $] in a page that loops on itself, ...)
>

ok, I add this to the TODO list

> And now for something different...
>
> What's the best way to send binary output in Embperl ?
>
> I generate ZIP and PDF files on the fly (check
> http://www.moviecovers.com/ if
> you wish), and the workaround I'm currently using is :
>
> - the Embperl page generates a temporary file in a special directory;
> - it outputs a HTTP Found (302) answer, with a redirection to the
> URL of the
> above file;
> - a crontab job "cleans" old files.
>
> That works rather well for most people, but some combinaisons of
> OS/browser/plugins aren't so pleased with redirections (Windows version of
> Netscape 4.5 + Adobe Acrobat Reader 4, to name one), so I'd like
> to experiment
> again with binary output.
>
> I've seen old messages in this mailing list about binary output
> from modperl,
> but not from Embperl...
>
> I want to output a file without any additionnal processing (that
> mangles with
> '\0's and stuff), and at the same time be nice to Embperl, so
> that it sends
> the headers *before* anything else (not afterwards :) )
>
> That looks possible, I just want to be sure I'm heading in the right
> direction...
>
For now the output functions of Embperl can't handle binary data. What you
can do is, set optEarlyHttpHeader (must be set in your httpd.conf), so the
headers are send, before the page is generated. Now you are able to use
mod_perl's output function. You can simply use print (not [+ ... +]) to
output your binary data.

Another possibility is to write a small Apache::Registry script which
handles the request and does the output, since there seems nothing todo for
Embperl in this case, as far as I see.

Gerald


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

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

Reply via email to