httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject MSIE + byteranges
Date Fri, 14 Feb 1997 03:04:42 GMT
I've been thinking about this issue again, after yesterday's flurry of
email regarding this issue, and have come to a different conclusion
than I did yesterday. Note that I still have not yet heard from
Microsoft has to whether or not they will fix IE 4.0 (though I assume
they will - the mail I have received from them seems somewhat
encouraging), but this deals with IE 3.0.

Basically, what I realized is regarding the HTTP/1.1 specification:
Namely, that it's 161 pages long, and contains a *lot* of
information. Microsoft claims to be compliant with standards, and
their byterange implementation is not compatible with HTTP/1.1's, but
I had an insight that it is actually standards-compliant: the
later Luotenen/Franks byterange drafts, which were very similar to
what ended up in HTTP/1.1, except that they used x- where HTTP/1.1
does not, were IDs of the HTTP-WG, and were intended to be included in
a standards-track document. Although you are not "supposed" to code
from an ID (except for experimental purporses), the reality is that
people do - the Apache Group has, a number of times.

This is what must have happened with Microsoft and Netscape: they coded to
draft-ietf-http-range-retrieval-00.txt, a standards-track IETF
internet draft, and assumed that the same would be part of
HTTP/1.1. They were not actively taking part in the complete HTTP/1.1
discssion, and may not have noticed the little change at the time it
was written. Since the complete HTTP/1.1 spec is so long, they
probably put off reading it until they were planning on implementing
it in their clients and servers (Microsoft told me that they are
planning on making IE 4.0 HTTP/1.1 compliant).

In this light, I've decided I'm amenable to adding in a User-Agent
check for MSIE (at least that doesn't catch any "clones", since there
are none - which is the main problem with looking for Mozilla) into
the byterange code, and sending multipart/x-byteranges to anything
with the "MSIE" substring.

Also, as I said before, I'd like to ditch the quotes from the boundary
string in the Content-Type header. Yes, MSIE's implementation is not
MIME-compliant (the MIME specs reccomend quotes in all cases), but
again, look at the HTTP spec. If I look at it from the point of view
of someone not intimately familiar with all the interent standards
(like MIME), and is concentrating on implementing HTTP, I might
miss the fact that the multipart/byteranges defenition is in fact a
reference to another standard. Both the ID and the HTTP/1.1 spec
define multipart/byteranges with regard to the MIME specs, but they do
not explicitly say "see the MIME specifications" - RFC 2046, which
defines multiparts, isn't even mentioned in the References section
(2047 is, though, which defines other parts of MIME).

In other words, while the defenition of multipart/[x-]byteranges is
very clear when you know it refers to the complete MIME spec, if you
didn't know that beforehand, it seems instead like a very vauge
defenition of multipart/byteranges: it does not define exact
semantics, does not provide a BNF, only an example. And so you might
code based on that example. And that example does not use quotes in
the boundary string. So you might not expect them.

So I say let's just remove the quotes.

Here's a patch that adds both of these:

P.S. I have yet to hear from anyone who has access to a Windows
machine who has tested byterange support as I asked someone to... I'm
taking Adobe's word that IE 3.0 for Windows is misfunctioning. I'd
perfer someone here did it. (and that way we'd also know if this patch
worked! Even if Adobe is right, the problem may involve other things
Apache does as well.)

Index: http_protocol.c
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.100
diff -c -r1.100 http_protocol.c
*** http_protocol.c	1997/02/11 17:02:04	1.100
--- http_protocol.c	1997/02/14 03:03:48
*** 1052,1057 ****
--- 1052,1064 ----
      return OK;
+ static int use_range_x(request_rec *r) {
+     char *ua;
+     return (table_get(r->headers_in, "Request-Range") ||
+ 	    ((ua = table_get(r->headers_in, "User-Agent"))
+ 	     && strstr(ua, "MSIE")));
+ }
  void send_http_header(request_rec *r)
      conn_rec *c = r->connection;
*** 1082,1090 ****
      if (r->byterange > 1)
          bvputs(fd, "Content-Type: multipart/",
! 	       table_get(r->headers_in, "Request-Range") ?
! 	       "x-byteranges" : "byteranges",
! 	       "; boundary=\"", r->boundary, "\"\015\012", NULL);
      else if (r->content_type)
          bvputs(fd, "Content-Type: ", 
  		 nuke_mime_parms (r->pool, r->content_type), "\015\012", NULL);
--- 1089,1096 ----
      if (r->byterange > 1)
          bvputs(fd, "Content-Type: multipart/",
! 	       use_range_x(r) ? "x-byteranges" : "byteranges",
! 	       "; boundary=", r->boundary, "\015\012", NULL);
      else if (r->content_type)
          bvputs(fd, "Content-Type: ", 
  		 nuke_mime_parms (r->pool, r->content_type), "\015\012", NULL);

Alexei Kosut <>      The Apache HTTP Server

View raw message