httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Tromey <tro...@creche.cygnus.com>
Subject http/1.0 compliance
Date Thu, 19 Sep 1996 18:54:56 GMT
Lately I've been working on our Apache test suite, with a particular
view towards HTTP/1.0 compliance.

I think I've found a few problems in Apache 1.1.1.  I'll send separate
email describing each problem.

The first problem is that a HEAD request with an If-Modified-Since
header doesn't return the same results as an ordinary HEAD request --
in particular the former can return 304 (not modified).

This is prohibited by this text in section 8.3:

  There is no "conditional HEAD" request analogous to the conditional
  GET. If an If-Modified-Since header field is included with a HEAD
  request, it should be ignored.

Appended is a patch, relative to 1.1.1, that fixes this.

Tom
-- 
tromey@cygnus.com                 Member, League for Programming Freedom

Index: http_protocol.c
===================================================================
RCS file: /rel/cvsfiles/devo/apache/src/http_protocol.c,v
retrieving revision 1.1.1.2
diff -c -5 -r1.1.1.2 http_protocol.c
*** http_protocol.c	1996/08/26 20:32:05	1.1.1.2
--- http_protocol.c	1996/09/19 18:30:09
***************
*** 202,212 ****
  
      /* Check for conditional GETs --- note that we only want this check
       * to succeed if the GET was successful; ErrorDocuments *always* get sent.
       */
      
!     if (r->status == 200 &&
  	if_modified_since && later_than(gmtime(&mtime), if_modified_since))
        
          return USE_LOCAL_COPY;
      else
          return OK;
--- 202,212 ----
  
      /* Check for conditional GETs --- note that we only want this check
       * to succeed if the GET was successful; ErrorDocuments *always* get sent.
       */
      
!     if (r->status == 200 && !r->header_only &&
  	if_modified_since && later_than(gmtime(&mtime), if_modified_since))
        
          return USE_LOCAL_COPY;
      else
          return OK;

Mime
View raw message