httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@hyperreal.org
Subject cvs commit: apache-1.3/src/main gen_test_char.c http_protocol.c util.c
Date Tue, 09 Feb 1999 12:30:06 GMT
fielding    99/02/09 04:30:05

  Modified:    src      CHANGES
               src/include ap_mmn.h httpd.h
               src/main gen_test_char.c http_protocol.c util.c
  Log:
  Reverse prior commit of ap_find_opaque_token() so that it can be replaced
  by a slightly different method using ap_get_list_item().
  
  Revision  Changes    Path
  1.1240    +0 -3      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1239
  retrieving revision 1.1240
  diff -u -r1.1239 -r1.1240
  --- CHANGES	1999/02/08 15:12:16	1.1239
  +++ CHANGES	1999/02/09 12:29:48	1.1240
  @@ -65,9 +65,6 @@
        the NDBM library looks like Berkeley-DB based.
        [Ralf S. Engelschall] PR#3773
   
  -  *) Fix checking of ETags and other opaque 'tokens' by adding
  -     ap_find_opaque_token().  PR#2065, 3657 [Ken Coar]
  -
     *) Add ability to handle DES or MD5 authentication passwords.
        [Ryan Bloom <rbb@Raleigh.IBM.Com>]
   
  
  
  
  1.27      +3 -6      apache-1.3/src/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/ap_mmn.h,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ap_mmn.h	1999/02/08 15:12:18	1.26
  +++ ap_mmn.h	1999/02/09 12:29:52	1.27
  @@ -203,13 +203,10 @@
    *                        scan_script_header -> ap_scan_script_header_err
    *                      - reordered entries in request_rec that were waiting
    *                        for a non-binary-compatible release.
  - * 19990108.1           - add ap_find_opaque_token() for things like ETags
  - *   (1.3.5-dev)          which can contain opaque quoted strings, and
  - *                        ap_MD5Encode() for MD5 password handling.
  + *          (1.3.5-dev)
  + * 19990108.1           - add ap_MD5Encode() for MD5 password handling.
    * 19990108.2           - add ap_validate_password() and change ap_MD5Encode()
  - *   (1.3.5-dev)          to use a stronger algorithm (which is incompatible
  - *                        with the one introduced [but not released] with
  - *                        19990108-1).
  + *                        to use a stronger algorithm.
    * 19990108.3           - add ap_find_list_item() and ap_get_list_item()
    */
   
  
  
  
  1.268     +0 -2      apache-1.3/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v
  retrieving revision 1.267
  retrieving revision 1.268
  diff -u -r1.267 -r1.268
  --- httpd.h	1999/02/08 15:12:18	1.267
  +++ httpd.h	1999/02/09 12:29:53	1.268
  @@ -936,8 +936,6 @@
   API_EXPORT(char *) ap_get_list_item(pool *p, const char **field);
   API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_white);
   API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok);
  -API_EXPORT(int) ap_find_opaque_token(pool *p, const char *line,
  -				     const char *tok);
   API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok);
   
   API_EXPORT(int) ap_is_url(const char *u);
  
  
  
  1.6       +1 -9      apache-1.3/src/main/gen_test_char.c
  
  Index: gen_test_char.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/gen_test_char.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- gen_test_char.c	1999/01/27 12:16:01	1.5
  +++ gen_test_char.c	1999/02/09 12:29:56	1.6
  @@ -8,7 +8,6 @@
   #define T_ESCAPE_PATH_SEGMENT	(0x02)
   #define T_OS_ESCAPE_PATH	(0x04)
   #define T_HTTP_TOKEN_STOP	(0x08)
  -#define T_HTTP_OPAQUETOKEN_STOP	(0x10)
   
   int main(int argc, char *argv[])
   {
  @@ -21,15 +20,13 @@
   "#define T_ESCAPE_PATH_SEGMENT	(%u)\n"
   "#define T_OS_ESCAPE_PATH	(%u)\n"
   "#define T_HTTP_TOKEN_STOP	(%u)\n"
  -"#define T_HTTP_OPAQUETOKEN_STOP	(%u)\n"
   "\n"
   "static const unsigned char test_char_table[256] = {\n"
   "    0,",
   	T_ESCAPE_SHELL_CMD,
   	T_ESCAPE_PATH_SEGMENT,
   	T_OS_ESCAPE_PATH,
  -	T_HTTP_TOKEN_STOP,
  -	T_HTTP_OPAQUETOKEN_STOP);
  +	T_HTTP_TOKEN_STOP);
   
       /* we explicitly dealt with NUL above
        * in case some strchr() do bogosity with it */
  @@ -55,11 +52,6 @@
   	/* these are the "tspecials" from RFC2068 */
   	if (ap_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c)) {
   	    flags |= T_HTTP_TOKEN_STOP;
  -	}
  -
  -	/* some tokens (like etags) are opaque strings; stop at the end */
  -	if (ap_iscntrl(c) || strchr(" ,", c)) {
  -	    flags |= T_HTTP_OPAQUETOKEN_STOP;
   	}
   	printf("%u%c", flags, (c < 255) ? ',' : ' ');
   
  
  
  
  1.256     +2 -4      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.255
  retrieving revision 1.256
  diff -u -r1.255 -r1.256
  --- http_protocol.c	1999/02/07 21:24:57	1.255
  +++ http_protocol.c	1999/02/09 12:29:57	1.256
  @@ -404,8 +404,7 @@
        */
       if ((if_match = ap_table_get(r->headers_in, "If-Match")) != NULL) {
           if ((etag == NULL) ||
  -            ((if_match[0] != '*')
  -	     && !ap_find_opaque_token(r->pool, if_match, etag))) {
  +            ((if_match[0] != '*') && !ap_find_token(r->pool, if_match, etag)))
{
               return HTTP_PRECONDITION_FAILED;
           }
       }
  @@ -438,8 +437,7 @@
           int rstatus;
   
           if ((if_nonematch[0] == '*')
  -            || ((etag != NULL)
  -		&& ap_find_opaque_token(r->pool, if_nonematch, etag))) {
  +            || ((etag != NULL) && ap_find_token(r->pool, if_nonematch, etag)))
{
               rstatus = (r->method_number == M_GET) ? HTTP_NOT_MODIFIED
                                                     : HTTP_PRECONDITION_FAILED;
               return rstatus;
  
  
  
  1.149     +0 -61     apache-1.3/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.148
  retrieving revision 1.149
  diff -u -r1.148 -r1.149
  --- util.c	1999/02/08 15:12:19	1.148
  +++ util.c	1999/02/09 12:29:58	1.149
  @@ -1209,67 +1209,6 @@
       }
   }
   
  -/*
  - * Find opaque HTTP tokens, which have no internal semantics and end
  - * at the first unquoted ',' or ' '.
  - */
  -API_EXPORT(int) ap_find_opaque_token(pool *p, const char *line,
  -				     const char *tok)
  -{
  -    const unsigned char *start_token;
  -    const unsigned char *s;
  -    char stop_quote = '\0';
  -
  -    if (!line) {
  -	return 0;
  -    }
  -
  -    s = (const unsigned char *)line;
  -    for (;;) {
  -	/* 
  -	 * Find start of token, skip all stop characters, note NUL
  -	 * isn't a token stop, so we don't need to test for it
  -	 */
  -	while (TEST_CHAR(*s, T_HTTP_OPAQUETOKEN_STOP)) {
  -	    ++s;
  -	}
  -	if (!*s) {
  -	    return 0;
  -	}
  -	start_token = s;
  -	/* 
  -	 * Find end of the token 
  -	 */
  -	while (*s) {
  -	    /*
  -	     * If we see the beginning of a quoted string ("foo" or <foo>),
  -	     * mark the end character so we know when to stop skipping.
  -	     */
  -	    if (!stop_quote && ((*s == '"') || (*s == '<'))) {
  -		stop_quote = (*s == '"') ? '"' : '>';
  -	    }
  -	    else if (*s == stop_quote) {
  -		stop_quote = '\0';
  -	    }
  -	    /*
  -	     * If we're not inside a quoted string, check to see if we're
  -	     * at the end of the token.
  -	     */
  -	    else if (!stop_quote && TEST_CHAR(*s, T_HTTP_OPAQUETOKEN_STOP)) {
  -		break;
  -	    }
  -	    ++s;
  -	}
  -	if (!strncmp((const char *)start_token, (const char *)tok,
  -		     s - start_token)) {
  -	    return 1;
  -	}
  -	if (!*s) {
  -	    return 0;
  -	}
  -    }
  -}
  -
   
   API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok)
   {
  
  
  

Mime
View raw message