You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2003/06/22 18:44:20 UTC

cvs commit: httpd-apreq-2/src apreq_parsers.c

joes        2003/06/22 09:44:20

  Modified:    src      apreq_parsers.c
  Log:
  Minor parser/hook cleanups.
  
  Revision  Changes    Path
  1.26      +4 -9      httpd-apreq-2/src/apreq_parsers.c
  
  Index: apreq_parsers.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/src/apreq_parsers.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- apreq_parsers.c	22 Jun 2003 15:34:43 -0000	1.25
  +++ apreq_parsers.c	22 Jun 2003 16:44:20 -0000	1.26
  @@ -982,7 +982,6 @@
               apr_status_t s;
               s = split_on_bdry(pool, ctx->bb, bb, NULL, ctx->bdry + 2);
               if (s != APR_SUCCESS) {
  -                printf("mfd init: split_on_bdry failed: %d\n",s);
                   return s;
               }
               ctx->status = MFD_NEXTLINE;
  @@ -994,7 +993,6 @@
               apr_status_t s;
               s = split_on_bdry(pool, ctx->bb, bb, NULL, CRLF);
               if (s != APR_SUCCESS) {
  -                printf("split_on_bdry failed: '%s'\n", CRLF);
                   return s;
               }
               ctx->status = MFD_HEADER;
  @@ -1018,14 +1016,12 @@
                   if (s == APR_EOF)
                       return APR_SUCCESS;
                   else {
  -                    printf("header parser failed: %d\n", s);
                       return s;
                   }
               cd = apr_table_get(ctx->info, "Content-Disposition");
   
               if (cd == NULL) {
                   ctx->status = MFD_ERROR;
  -                printf("Can't find Content-Disposition header.\n");
                   return APR_BADARG;
               }
   
  @@ -1111,7 +1107,6 @@
   
       case MFD_UPLOAD:
           {
  -            apr_bucket *eos;
               apr_status_t s = split_on_bdry(pool, ctx->bb, bb, 
                                              ctx->pattern, ctx->bdry);
               apreq_param_t *param;
  @@ -1133,16 +1128,16 @@
                   return mfd_bb_concat(pool, cfg, param->bb, ctx->bb);
   
               case APR_SUCCESS:
  -                eos = apr_bucket_eos_create(ctx->bb->bucket_alloc);
  -                APR_BRIGADE_INSERT_TAIL(ctx->bb, eos);
  -
                   if (parser->hook) {
  +                    apr_bucket *eos = 
  +                        apr_bucket_eos_create(ctx->bb->bucket_alloc);
  +                    APR_BRIGADE_INSERT_TAIL(ctx->bb, eos);
                       s = apreq_run_hook(parser->hook, pool, cfg, ctx->bb);
  +                    apr_bucket_delete(eos);
                       if (s != APR_SUCCESS)
                           return s;
                   }
   
  -                apr_bucket_delete(eos);
                   param->v.status = mfd_bb_concat(pool, cfg,
                                                   param->bb, ctx->bb);