You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Phil Edwards <pm...@devphil.com> on 2002/08/18 21:05:34 UTC

Apache 2.x, .gz/.bz2 file, Bug 2820, oh boy

I've been learning Apache 2 from scratch, having never set it up before.
So far everything has been working wonderfully.

It's serving some gzip'd and bzip2'd files, and I'm told Mozilla and
other browsers can uncompress/display these on the fly.  Apache 2.0.39
came with a "mod_deflate" file, but from what I've read that seems to be
something unrelated.  (I could easily be wrong.)


Looking through the bugzilla database at nagoya.apache.org, I found bug
2820, which ended about five months ago with, "this can be done now."  I
think it's talking about the same thing I am, but I haven't the foggiest
idea how to do it.

Searching the archives of this list turned up a few mentions of "mod_gzip"
but the Apache 2 manual doesn't mention that.  Is it an Apache 1 thing?

The problem seems to be that Apache needs to tell the browser, "hey,
this isn't text/html or text/plain that I'm sending to you, do the right
thing," and right now I haven't done that.  At least, Mozilla thinks that
the .gz/.bz2 files are text.


I have a strong suspicion that millions of Apache users all over the
world have successfully done this, and I'm missing something obvious.
:-)  Can somebody point me to where I can learn more?


Phil

-- 
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
                                                 - Edsger Dijkstra, 1930-2002

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache 2.x, .gz/.bz2 file, Bug 2820, oh boy

Posted by Phil Edwards <pm...@devphil.com>.
On Sun, Aug 18, 2002 at 03:26:48PM -0400, Michael wrote:
> 	Hmm... so many questions :)

Yeah, I'm a curious one.  :-)


> 	The browsers can't actually ahndle bz2 files, or at least according
> to spec they don't :)

Bummer.  bzip2 gives us so much better compression than gzip.


> 	mod_deflate is actually exactly what you're looking for, also :)

Ah!


> 	mod_gzip is currently only an apache 1 thing. I'm not sure if
> the people who made it plan to port it to apache 2.0 or not, since
> mod_deflate provides the same functionality.

Makes sense in light of your comment above.


> 	Well, there's good news here :) The first piece of good news is
> that you don't have to pre-gzip the files. mod_deflate can do
> that for you on the fly.

Ehhhhhhhhxcellent.


> 	The last question that you didn't ask but probably would have :)
[..]
> 	And you should get back the headers as plaintext, and everything
> following should be unreadable binary :)

I would have, I should have, and this worked like a charm.


Thanks very much!

Phil

-- 
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
                                                 - Edsger Dijkstra, 1930-2002

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Apache 2.x, .gz/.bz2 file, Bug 2820, oh boy

Posted by Michael <mi...@asstr.org>.
	Hmm... so many questions :)

On Sun, 18 Aug 2002, Phil Edwards wrote:

> I've been learning Apache 2 from scratch, having never set it up before.
> So far everything has been working wonderfully.
>
> It's serving some gzip'd and bzip2'd files, and I'm told Mozilla and
> other browsers can uncompress/display these on the fly.  Apache 2.0.39
> came with a "mod_deflate" file, but from what I've read that seems to be
> something unrelated.  (I could easily be wrong.)

	The browsers can't actually ahndle bz2 files, or at least according
to spec they don't :) The spec. allows for gzip and compress format
compression. In general there's no point in using compress, since gzip is
much better and I don't know of any browser that supports one and not
the other.

	mod_deflate is actually exactly what you're looking for, also :)

>
> Looking through the bugzilla database at nagoya.apache.org, I found bug
> 2820, which ended about five months ago with, "this can be done now."  I
> think it's talking about the same thing I am, but I haven't the foggiest
> idea how to do it.
>
> Searching the archives of this list turned up a few mentions of "mod_gzip"
> but the Apache 2 manual doesn't mention that.  Is it an Apache 1 thing?

	mod_gzip is currently only an apache 1 thing. I'm not sure if
the people who made it plan to port it to apache 2.0 or not, since
mod_deflate provides the same functionality.

>
> The problem seems to be that Apache needs to tell the browser, "hey,
> this isn't text/html or text/plain that I'm sending to you, do the right
> thing," and right now I haven't done that.  At least, Mozilla thinks that
> the .gz/.bz2 files are text.

	Well, there's good news here :) The first piece of good news is
that you don't have to pre-gzip the files. mod_deflate can do
that for you on the fly. The second piece of good news is that,
as I understand it (although I've never done it) you can configure
apache's content negotiation features to serve up pre-gzipped
files if processor power is more dear to you than disk space.

	The last question that you didn't ask but probably would have :)
is how to test that mod_deflate magically "works" after you configure it.
For that, you want to telnet to your server on port 80, and send the
following request:

GET / HTTP/1.1
Host: www.yourhostnamehere.com

	You should get back your main page. Then do this request:

GET / HTTP/1.1
Host: www.yourhostnamehere.com
Accept-Encoding: gzip

	And you should get back the headers as plaintext, and everything
following should be unreadable binary :)

>
> I have a strong suspicion that millions of Apache users all over the
> world have successfully done this, and I'm missing something obvious.
> :-)  Can somebody point me to where I can learn more?
>
>
> Phil
>
> --
> I would therefore like to posit that computing's central challenge, viz. "How
> not to make a mess of it," has /not/ been met.
>                                                  - Edsger Dijkstra, 1930-2002
>
> ---------------------------------------------------------------------
> 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
>    "   from the digest: users-digest-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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org