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

Re: [MacPerl] MacHTTP CGI question revisited



pudge@pobox.com (Chris Nandor)
>At 13.57 97/5/1, David Ray wrote:
>>At 8:13 AM 5/1/97, Chris Nandor wrote:
>>> ...the reason the info is not supplied in some of the variables is not
>>> because the browser does not supply them, but because the glue does not
>>> supply them, I think.

Not sure about that.

>>That's correct. A previous version of MacPerl and/or the glue did send all
>>the >ENV variables correctly. This is a known bug with the current
>>release.
>
>No, this is a different problem.  There are two.
>
>1.)  BUG: The current MacPerl does not properly populate the %ENV hash from
>the CGI glue.

Correct.

>2.)  PROBLEM, NOT A BUG: The CGI glue only supplies a portion of the
>possible environment variables.

If this is indeed what happens, it IS a bug. The combination of CGI glue and
MacPerl has the objective of being compatible with the CGI specification, and
the CGI specification unambiguously demands that all headers be provided in
environment variables.

> For instance, Internet Explorer provides environment variables describing the
> monitor resolution and screen depth.  But the CGI glue does not retrieve
> these variables, because it does not retrieve any variables that it is not
> hardcoded to retrieve, so it will not get those variables.

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.

> I believe the only environment variables you can get through the CGI Script
> glue are (if I am mistaken, please correct me, someone):

I believe you are mistaken at least in theory, and I think also with some
servers in practice.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "We all agree on the necessity of compromise.  We just can't agree on
    when it's necessary to compromise."
              --Larry Wall in  <1991Nov13.194420.28091@netlabs.com>

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