httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: apache-1.3/src/main http_protocol.c
Date Thu, 03 Oct 2002 20:51:53 GMT
jim         2002/10/03 13:51:53

  Modified:    src/main http_protocol.c
  Log:
  Sometimes I'm a dope. No need to allocate a bunch a space... we just
  want to see if there's any whitespace past the number.
  
  Revision  Changes    Path
  1.329     +2 -3      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.328
  retrieving revision 1.329
  diff -u -r1.328 -r1.329
  --- http_protocol.c	17 Sep 2002 01:09:19 -0000	1.328
  +++ http_protocol.c	3 Oct 2002 20:51:53 -0000	1.329
  @@ -1072,10 +1072,9 @@
           r->proto_num = HTTP_VERSION(r->protocol[5] - '0', r->protocol[7] - '0');
       }
       else {
  -        char *lint;
  +        char lint[2];
           char http[5];
  -	lint = ap_palloc(r->pool, strlen(r->protocol)+1);
  -	if (3 == sscanf(r->protocol, "%4s/%u.%u%s", http, &major, &minor, lint)
  +	if (3 == sscanf(r->protocol, "%4s/%u.%u%1s", http, &major, &minor, lint)
               && (strcasecmp("http", http) == 0)
   	    && (minor < HTTP_VERSION(1,0)) ) /* don't allow HTTP/0.1000 */
   	    r->proto_num = HTTP_VERSION(major, minor);
  
  
  

Mime
View raw message