Resend: same four LWP patches

Marc Hedlund (hedlund@best.com)
Sun, 6 Aug 1995 18:00:16 -0700


Those patches were wrapped incorrectly by the time they returned to my machine.
Here they are in plaintext.  Apologies for the duplicates.


patch.a:

*** StatusCode.pm.orig  Sun Aug  6 14:46:32 1995
--- StatusCode.pm       Sun Aug  6 14:50:21 1995
***************
*** 29,40 ****
     RC_OK
     RC_CREATED
     RC_ACCEPTED
!    RC_PROVISIONAL_INFORMATION
     RC_NO_CONTENT
     RC_MULTIPLE_CHOICES
     RC_MOVED_PERMANENTLY
     RC_MOVED_TEMPORARILY
!    RC_METHOD
     RC_NOT_MODIFIED
     RC_BAD_REQUEST
     RC_UNAUTHORIZED
--- 29,40 ----
     RC_OK
     RC_CREATED
     RC_ACCEPTED
!    RC_NON_AUTHORITATIVE_INFORMATION
     RC_NO_CONTENT
     RC_MULTIPLE_CHOICES
     RC_MOVED_PERMANENTLY
     RC_MOVED_TEMPORARILY
!    RC_SEE_OTHER
     RC_NOT_MODIFIED
     RC_BAD_REQUEST
     RC_UNAUTHORIZED
***************
*** 47,52 ****
--- 47,53 ----
     RC_REQUEST_TIMEOUT
     RC_CONFLICT
     RC_GONE
+    RC_AUTHORIZATION_NEEDED
     RC_INTERNAL_SERVER_ERROR
     RC_NOT_IMPLEMENTED
     RC_BAD_GATEWAY
***************
*** 75,86 ****
      200 => 'OK',
      201 => 'Created',
      202 => 'Accepted',
!     203 => 'Provisional Information',
      204 => 'No Content',
      300 => 'Multiple Choices',
      301 => 'Moved Permanently',
      302 => 'Moved Temporarily',
!     303 => 'Method',
      304 => 'Not Modified',
      400 => 'Bad Request',
      401 => 'Unauthorized',
--- 76,87 ----
      200 => 'OK',
      201 => 'Created',
      202 => 'Accepted',
!     203 => 'Non-Authoritative Information',
      204 => 'No Content',
      300 => 'Multiple Choices',
      301 => 'Moved Permanently',
      302 => 'Moved Temporarily',
!     303 => 'See Other',
      304 => 'Not Modified',
      400 => 'Bad Request',
      401 => 'Unauthorized',
***************
*** 93,98 ****
--- 94,100 ----
      408 => 'Request Timeout',
      409 => 'Conflict',
      410 => 'Gone',
+     411 => 'Authorization Refused',
      500 => 'Internal Server Error',
      501 => 'Not Implemented',
      502 => 'Bad Gateway',


patch.b:

*** MIMEheader.pm.orig  Sun Aug  6 13:34:40 1995
--- MIMEheader.pm       Sun Aug  6 13:50:09 1995
***************
*** 34,51 ****
  #    - General-Headers
  #    - Request-Headers
  #    - Entity-Headers
! # (From draft-ietf-http-v10-spec-00.ps)
  
  my @header_order = qw( 
!    Date Forwarded Message-ID MIME-Version
  
     Accept Accept-Charset Accept-Encoding Accept-Language
!    Authorization From If-Modified-Since Praga Referer User-Agent
!    
!    Content-Encoding Content-Language Content-Length
!    Content-Transfer-Encoding Content-Type Derived-From
!    Expires Last-Modified Link Location Title URI-Header
!    Version
  );
  
  # Make alternative representations of @header_order.  This is used
--- 34,50 ----
  #    - General-Headers
  #    - Request-Headers
  #    - Entity-Headers
! # (From draft-ietf-http-v10-spec-01.ps)
  
  my @header_order = qw( 
!    Date Forwarded MIME-Version Pragma
  
     Accept Accept-Charset Accept-Encoding Accept-Language
!    Authorization From If-Modified-Since Orig-URI Referer User-Agent
! 
!    Allow Content-Encoding Content-Language Content-Length
!    Content-Transfer-Encoding Content-Type
!    Expires Last-Modified Link Title URI
  );
  
  # Make alternative representations of @header_order.  This is used


patch.c:

*** MIMEheader.pm.orig  Sun Aug  6 13:52:12 1995
--- MIMEheader.pm       Sun Aug  6 13:53:34 1995
***************
*** 33,38 ****
--- 33,39 ----
  # "Good Practice" order of HTTP message headers:
  #    - General-Headers
  #    - Request-Headers
+ #    - Response-Headers
  #    - Entity-Headers
  # (From draft-ietf-http-v10-spec-01.ps)
  
***************
*** 41,46 ****
--- 42,49 ----
  
     Accept Accept-Charset Accept-Encoding Accept-Language
     Authorization From If-Modified-Since Orig-URI Referer User-Agent
+ 
+    Location Public Retry-After Server WWW-Authenticate
  
     Allow Content-Encoding Content-Language Content-Length
     Content-Transfer-Encoding Content-Type


patch.d:

*** MIMEheader.pm.orig  Sun Aug  6 14:52:37 1995
--- MIMEheader.pm       Sun Aug  6 15:07:40 1995
***************
*** 130,135 ****
--- 130,141 ----
      croak('need a field name') unless defined $field;
      croak('to many parameters') if @_ > 4;
  
+     my $std_field = lc $field;
+     unless( defined $standard_case{$std_field} ) {
+         $field =~ s/\b(\w)/\u$1/g;
+         $standard_case{$std_field} = $field;
+     } 
+ 
      my $thisHeader = \@{$self->{'_header'}{lc $field}};
  
      my @old = ();
***************
*** 218,229 ****
          if (defined $list) {
              my $val;
              my $std_field = $standard_case{$field};
-             unless (defined $std_field) {
-                 # unknown header, determine suitable "casing" for it
-                 $std_field = $field;
-                 $std_field =~ s/\b(\w)/\u$1/g;
-                 $standard_case{$field} = $std_field; # remember it
-             }
              for $val (@$list) {
                  &$sub($std_field, $val);
              }
--- 224,229 ----