httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/t parsers.c
Date Thu, 10 Jun 2004 00:33:44 GMT
joes        2004/06/09 17:33:44

  Modified:    t        parsers.c
  Log:
  Fix brigade split in mfd parser test (original code left the first brigade empty after the
split).
  
  Revision  Changes    Path
  1.12      +7 -1      httpd-apreq-2/t/parsers.c
  
  Index: parsers.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/t/parsers.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- parsers.c	9 Jun 2004 21:56:17 -0000	1.11
  +++ parsers.c	10 Jun 2004 00:33:44 -0000	1.12
  @@ -91,10 +91,16 @@
           APR_BRIGADE_INSERT_HEAD(bb, e);
           APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_eos_create(bb->bucket_alloc));
   
  +        /* Split e into two buckets, leaving e with the first j bytes. 
  +         * Then put all the buckets after e into the tail brigade,
  +         * drop any existing parser data (from a previous pass through
  +         * the loop) and run the parser tests.
  +         */
           apr_bucket_split(e,j);
  -        tail = apr_brigade_split(bb,e);
  +        tail = apr_brigade_split(bb, APR_BUCKET_NEXT(e));
           req->body = NULL;
           req->parser = NULL;
  +
           rv = apreq_parse_request(req,bb);
           CuAssertIntEquals(tc, APR_INCOMPLETE, rv);
           rv = apreq_parse_request(req, tail);        
  
  
  

Mime
View raw message