Bug 31228 - New 226 HTTP Response Code [PATCH]
Summary: New 226 HTTP Response Code [PATCH]
Status: CLOSED WONTFIX
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.0-HEAD
Hardware: All All
: P3 enhancement with 19 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable, RFC
Depends on:
Blocks:
 
Reported: 2004-09-14 22:01 UTC by James E. Robinson, III
Modified: 2005-03-08 11:47 UTC (History)
3 users (show)



Attachments
updated patch, correcting issues I noticed from the proposed patch (2.29 KB, patch)
2004-09-15 22:09 UTC, Garrett Rooney
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James E. Robinson, III 2004-09-14 22:01:32 UTC
RFC3229 outlines Delta Encoding for HTTP/1.1

The following patch will allow applications implementing RFC3229 to send the
appropriate HTTP response header ("226 IM Used").

------8<--------8<----------

diff -ur httpd-2.0.50/include/httpd.h httpd-2.0.50-jer/include/httpd.h
--- httpd-2.0.50/include/httpd.h        Mon Feb  9 15:54:34 2004
+++ httpd-2.0.50-jer/include/httpd.h    Tue Sep 14 17:50:55 2004
@@ -425,6 +425,7 @@
 #define HTTP_RESET_CONTENT                 205
 #define HTTP_PARTIAL_CONTENT               206
 #define HTTP_MULTI_STATUS                  207
+#define HTTP_IM_USED                       226
 #define HTTP_MULTIPLE_CHOICES              300
 #define HTTP_MOVED_PERMANENTLY             301
 #define HTTP_MOVED_TEMPORARILY             302
diff -ur httpd-2.0.50/modules/http/http_protocol.c
httpd-2.0.50-jer/modules/http/http_protocol.c
--- httpd-2.0.50/modules/http/http_protocol.c   Mon Feb  9 15:53:18 2004
+++ httpd-2.0.50-jer/modules/http/http_protocol.c       Tue Sep 14 17:54:59
2004@@ -85,6 +85,7 @@
     "205 Reset Content",
     "206 Partial Content",
     "207 Multi-Status",
+    "226 IM Used",
 #define LEVEL_300 11
     "300 Multiple Choices",
     "301 Moved Permanently",
Comment 1 Garrett Rooney 2004-09-15 20:56:54 UTC
I'm not sure, as I'm not familiar with this code, but at first glance this patch
seems incomplete.

I think if you add entries to the status_lines array you also need to bump up
the RESPONSE_CODES define in httpd.h.  Additionally, all the other spots in the
array that have gaps in the numbers insert "unused" slots, so this probably has
to do the same thing.  Finally, the addition of an entry in the 200 section will
invalidate the LEVEL_300, LEVEL_400, and LEVEL_500 defines, so those will have
to be adjusted to account for the new slots being used.
Comment 2 Garrett Rooney 2004-09-15 22:09:19 UTC
Created attachment 12746 [details]
updated patch, correcting issues I noticed from the proposed patch
Comment 3 Geoffrey Young 2004-12-09 15:20:38 UTC
fixed in 2.1.3
Comment 4 Geoffrey Young 2004-12-09 22:10:33 UTC
per veto from roy, this change was backed out of 2.1.3.
Comment 5 Geoffrey Young 2004-12-09 22:58:12 UTC
please see the discussion thread at

  http://marc.theaimsgroup.com/?t=110260191100002&r=1&w=2

for more details.