Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ob_start('ob_gzhandler') 1

Status
Not open for further replies.

xso

Programmer
Apr 12, 2002
71
0
0
DE
Hello there,

Is there any direct way to see if the function ob_start('ob_gzhandler') is indeed working and compressing the file? I can see in the apache log file that the file has been compressed but I was wondering what to do in case someone has o access to the apache log file...

Cheers,

Xavier
 
You can check it by hand from the client side.

Open a telnet session to your server on port 80 and issue the sequence:

[tt]
Code:
GET <your script> HTTP/1.1[return]
Host: <your hostname>[return]
Accept-encoding: deflate, gzip, x-gzip, identity, *;[return]
[return]
[/tt]

If you are hitting
Code:
&quot;[URL unfurl="true"]http://www.foo.bar/myscript.php&quot;[/URL]
, then &quot;<your script>&quot; is &quot;/myscript.php&quot; (the initial slash must be there), and &quot;<your hostname>&quot; is
Code:
&quot;www.foo.bar&quot;
. Your input to the server must end with two returns in a row. You may have to log your telnet session to see the headers returned. Depending on your server, the HTTP headers may be case-specific.

If you do this without the &quot;Accept-encoding&quot; line, you will get a normal set of HTTP headers and straight HTML.

With the &quot;Accept-coding&quot; line included, you will see an HTTP reply header reading &quot;Content-Encoding: gzip&quot; and your HTML will appear as 8-bit gobbledygook on the screen. ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top