RE: [PHP] Mixing PHP3 & SSI

From: Date: Sun, 14 Jan 2001 05:42:10 +0000
Subject: RE: [PHP] Mixing PHP3 & SSI
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34451@lists.php.net to get a copy of this message
> > > If readfile is indeed that "broken", maybe we can talk the > > > powers that be into dumping full HTTP headers through the > > > readfile call in a future version.... I mean, the main > > > script has it already from when it was called... so it > > > should be able to sub-call pages in that same context. > > > > readfile() is not broken at all. > > "broken" was in quotes for a reason... yes, it works the way the docs say - > but it doesnt work well enough in light of the fact that virtual gives me > garbage. Well, shouldn't you be complaining about virtual() then? > If I do a readfile() request to that SHTML file through PHP3.0.15, I ALWAYS > get a Netscape based response, even when the calling PHP3 knows that it was > called from an IE browser. This is no doubt due to the HTTP 1.0 connection > used (To quote the online PHP manual:) > > If filename begins with "http://" (not case > sensitive), > an HTTP 1.0 connection is opened to the specified server > and the text of the response is written to standard output. > > This is nice, and things like .CGI's and other scripts can be used this > way - but not completely transparently as can be seen in my case (and this > will of course fail when referencing a name-based host... something thats > becoming more and more prevalent these days). > > But obviously it's not a FULL HTTP 1.0 connection - other wise it would have > a > > User-Agent: > > line in the request header, wouldnt it? It is a full connection and a User-Agent header is sent. The user agent is reported accurately as "PHP" followed by a version number. It is not Netscape nor IE making this HTTP request, it is PHP. -Rasmus

« previous php.general (#34451) next »