From 6218fbed2b8608ff70b0b2244b5cae9971cba7f1 Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Thu, 29 Nov 2001 06:03:33 -0800
Subject: [PATCH] [svn] Accept the broken Content-Range format emitted by Sun's
 server. Published in <sxsg06x7kld.fsf@florida.arsdigita.de>.

---
 src/ChangeLog | 5 +++++
 src/http.c    | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index 0dea6fdd..cfccccec 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+	* http.c (http_process_range): Accept the broken output of
+	"JavaWebServer/1.1.1".
+
 2001-11-28  Hrvoje Niksic  <hniksic@arsdigita.com>
 
 	* progress.c (dot_set_params): If PARAMS is unspecified, use
diff --git a/src/http.c b/src/http.c
index b0f70946..3f9d8b0a 100644
--- a/src/http.c
+++ b/src/http.c
@@ -202,6 +202,10 @@ http_process_range (const char *hdr, void *arg)
   if (!strncasecmp (hdr, "bytes", 5))
     {
       hdr += 5;
+      /* "JavaWebServer/1.1.1" sends "bytes: x-y/z", contrary to the
+	 HTTP spec. */
+      if (*hdr == ':')
+	++hdr;
       hdr += skip_lws (hdr);
       if (!*hdr)
 	return 0;