[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacHTTP CGI question revisited



At 8.59 97/5/2, Matthias Ulrich Neeracher wrote:
>This at least does not reflect my intent in the CGI glue, and, I think, does
>not reflect what happens with WebStar. Web* provides an AppleEvent parameter
>containing the full HTTP header, and the CGI glues parses it into the correct
>environment variables. If you see omitted headers, this suggests:
>
> - You are using a HTTP daemon that doesn't pass the Web* full header.
> - Or the CGI glue has a bug in parsing the parameter.

The first idea is possible, but the same thing happens with both NetPresenz
and MacHTTP 2.2.  The one I am testing in particular is HTTP_ACCEPT, which
is a standard environment variable.  It shows up in neither of the two web
daemons with the CGI glue.  It does, however, show up in a UNIX version of
the CGI, as well as in a little Mac server script that I wrote w/ sockets.

But it does not show up in the CGI script no matter how I try and get it.

I'd be curious to know if anyone can get the following CGI to report the
HTTP_ACCEPT variable on any Mac web server:

        #!perl
        $| = 1;
        print "Content-type: text/plain", "\n\n";
        $ha   = $ENV{HTTP_ACCEPT};
        $ssua = "$ENV{SERVER_SOFTWARE} and $ENV{HTTP_USER_AGENT}";
        if ($ha) {print "HTTP_ACCEPT: $ha for $ssua\n"}
        else {print "No go for $ssua\n"}
        exit;


On my server right now, I get:

        No go for MacHTTP/2.0 and Mozilla/3.01 (Macintosh; U; PPC)


I want to get something like this:

        HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
        for MacHTTP/2.0 and Mozilla/3.01 (Macintosh; U; PPC)

If someone can get this, then it must be a problem with the servers I'm
using.  If no one can get it with WebStar, then I think it must be a glue
problem.

#================================================================
Chris Nandor                                      pudge@pobox.com
PGP Key 1024/B76E72AD                           http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch