httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Luoni" <lu...@gol.com>
Subject Re: svg data are prepended by 54 "random" bytes
Date Fri, 01 Mar 2002 08:12:35 GMT
sorry! i misinterpreted the ethereal output. the 54 bytes are of course the
protocol headers.

still, the svg graphics still don't work. if somebody has an idea looking at
the script below, i'd be grateful (and yes, the svg plugin has been
installed in the client).

-mario

----- Original Message -----
From: "Mario Luoni" <luoni@gol.com>
To: <users@httpd.apache.org>
Sent: Friday, March 01, 2002 08:38
Subject: svg data are prepended by 54 "random" bytes


> hi!
>
> i'm using apache server 1.3.20 for a web application. i want to send an
svg
> graphics using an nph cgi script, but it doesn't work. the perl script is
> very simple, it outputs the http header plus scg graphics data read from a
> file called "web.svg".
>
> **********************************************************************
> #!/usr/bin/perl -w
> #Filename: nph-send-svg.cgi
>
> $|=1;  # commenting this out doesn't make a difference
>
> print "HTTP/1.1 200 OK\r\n";
> print "Content-type: image/svg\r\n\r\n";  # required header
>
> open ($img,"< web.svg") || die;
> while(<$img>) {
>     print;
> }
> close($img);
> **********************************************************************
>
> when i tried to figure out why it didn't work, i found out (using
ethereal),
> that somewhere between the perl script and the client (i guess it's at the
> server) 54 to me meaningless bytes are /pre/pended to the data proper
before
> being transmitted to the client.
>
> concretely, the data actually sent to the client looks like this:
>
> <00 90 99 4b 5c 48 ... <another 42 "random" bytes>...19 20 12 97 00
> 00>HTTP/1.1 200 OK\r\nContent-type: image/svg\r\n....
>
> seeing as the beginning of the data received by the client looks pretty
> binary, a dialog pops up for me to choose if i want to execute the data or
> to save it to the hard disk. of course i want neither of both, i want the
> graphics to be displayed.
>
> does anybody have an idea why this happens and how i can avoid it?
>
> thanks in advance,
>
> -mario
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message