httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@nueva.pvt.k12.ca.us>
Subject More MSIE + byteranges
Date Tue, 18 Feb 1997 01:31:56 GMT
I haven't seen any mail on this today, so I'd like to try and get the
issue closed and done with before 1.2b7, so I can have something
concrete to go back to Adobe and Microsoft with (I still haven't heard
from the Microsoft people since their initial response, but I don't
really want to bug them more until we've come to a decision here).

Here's the situation:

Netscape Navigator 2 and 3, and MSIE 3, are all incompatible with
Apache's implementations of byteranges (Apache's right, they're wrong,
but we'll leave that alone for now). Currently, 1.2b7-dev looks for
the "Request-Range" header, which Netscape sends, and modifies its
response to conform to what Navigator wants.

There is a patch I submitted that also looks for "MSIE 3" in the
User-Agent string, and does the same thing if it finds it. It also
removes some quotes that MSIE doesn't like.

Roy has said that he'd perfer looking at the User-Agent header for
"Mozilla/2" and "Mozilla/3" instead of the two seperate checks
(Mozilla will catch those clients, and others). I'd perfer to keep it
as described above, and Roy has said he doesn't feel strongly enough
about it to veto it.

Paul, Ben and Jim have voted +1 on the patch (which I've included
below), and Dean +1ed removing the quotes earlier.

Does anyone have any other or differing opinions on this? If not, I'll
commit the patch sometime tomorrow.

Here it is, again:

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 3")));
+ }
+ 
  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 <akosut@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/



Mime
View raw message