You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1996/04/07 21:04:24 UTC

Apache cannot handle multiple encoding types per document (fwd)

no acked. Cc replies to submitter.

From: Bill Bumgarner <bb...@friday.com>
Date: Sun,  7 Apr 96 14:01:49 -0500
To: apache-bugs@mail.apache.org
Subject: Apache cannot handle multiple encoding types per document
Reply-To: bbum@friday.com


Apache-folks,

	[Unlike NCSA], Apache cannot handle multiple encoding types per  
document.  For example, the following URL...
	
	http://www.friday.com/~bbum/Urlifier-1_7.bundle.tar.gz
	
	... leads to a file that SHOULD have TWO encoding headers; x-gzip  
and x-gtar and a custom content type of application/bundle-MAB.  This state  
was created with the following lines in srm.conf...
	
AddEncoding x-gzip gz
AddEncoding x-tar tar
AddType application/bundle-MAB bundle
	
	As well, I removed the application/tar content type from the  
mime.types file.
	
	When Apache receives a request for the above URL, it replies with  
the following headers:
	
	
HTTP/1.0 200 OK
Date: Sun, 07 Apr 1996 ? GMT
Server: Apache/1.0.3
Content-type: text/plain
Content-encoding: x-gzip
Content-length: 17428
Last-modified: Sun, 07 Apr 1996 ? GMT

	No second Content-encoding: header and the Content-type is wrong.
	
	I suspect the problem will require a non trivial fix.
	
	Looking at the code, the send_http_header() [httpd_protocol.c:509]  
function writes the Content-encoding: header based on the value of the  
request records content_encoding field.  Unfortunately, the content_encoding  
field is merely a pointer to a string-- ie; it cannot hold multiple  
encodings.
	
	Further examination reveals that a fix will require significant  
changes to how the file name is parsed, how the request_record structure is  
filled in, and-- finally-- how the server reply headers are constructed.
	
	Is anyone working on a fix?
	
	thanks,
	b.bum

----- End of forwarded message from Bill Bumgarner -----

-- 
Rob Hartill (robh@imdb.com)
The Internet Movie Database (IMDb)  http://www.imdb.com/
           ...more movie info than you can poke a stick at.

Re: Apache cannot handle multiple encoding types per document (fwd)

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Sun, 7 Apr 1996, Bill Bumgarner wrote:

> 	[Unlike NCSA], Apache cannot handle multiple encoding types per
> document.  For example, the following URL...
>
> 	http://www.friday.com/~bbum/Urlifier-1_7.bundle.tar.gz
>
> 	... leads to a file that SHOULD have TWO encoding headers; x-gzip
> and x-gtar and a custom content type of application/bundle-MAB.  This state
> was created with the following lines in srm.conf...

Hmm. While I'm not quite sure about the specifics (in my opinion, a
tarfile is a content type, not an encoding), you are correct that
when multiple encodings are applied, they should be denoted as such in
the Content-encoding header. That Apache does not do this might be
characterized as a bug. It's almost certainly a missing feature.

However, Apache 1.1, of which a public beta should be out sometime in
April, will contain a rewritten find_ct() function which should
provide a fix for this problem. Hopefully, it will work for your
situation.

Thanks!

--
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us>
URL: http://www.nueva.pvt.k12.ca.us/~akosut/
The Apache Project <http://www.apache.org>