httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: httpd-test/flood config.h.in flood_profile.h flood_round_robin.c
Date Thu, 18 Mar 2004 18:28:08 GMT
aaron       2004/03/18 10:28:08

  Modified:    flood    config.h.in flood_profile.h flood_round_robin.c
  Log:
  Add support for content-type in a POST method.
  
  Submitted by:   Philippe Marzouk <phil ozigo.org>
  Reviewed by:    Aaron Bannert
  
  Revision  Changes    Path
  1.31      +1 -0      httpd-test/flood/config.h.in
  
  Index: config.h.in
  ===================================================================
  RCS file: /home/cvs/httpd-test/flood/config.h.in,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- config.h.in	9 Sep 2003 13:59:17 -0000	1.30
  +++ config.h.in	18 Mar 2004 18:28:08 -0000	1.31
  @@ -22,6 +22,7 @@
   #define XML_URLLIST_METHOD_POST "post"
   #define XML_URLLIST_METHOD_HEAD "head"
   #define XML_URLLIST_PAYLOAD "payload"
  +#define XML_URLLIST_CONTENT_TYPE "content-type"
   #define XML_URLLIST_PAYLOAD_TEMPLATE "payloadtemplate"
   #define XML_URLLIST_REQUEST_TEMPLATE "requesttemplate"
   #define XML_URLLIST_RESPONSE_TEMPLATE "responsetemplate"
  
  
  
  1.17      +3 -0      httpd-test/flood/flood_profile.h
  
  Index: flood_profile.h
  ===================================================================
  RCS file: /home/cvs/httpd-test/flood/flood_profile.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- flood_profile.h	9 Feb 2004 08:12:56 -0000	1.16
  +++ flood_profile.h	18 Mar 2004 18:28:08 -0000	1.17
  @@ -69,6 +69,9 @@
       /* Following only valid when method == POST */
       apr_size_t payloadsize;
       void * payload;
  +
  +    apr_size_t contenttypesize;
  +    char * contenttype;
       
       apr_uri_t *parsed_uri;
   
  
  
  
  1.41      +14 -1     httpd-test/flood/flood_round_robin.c
  
  Index: flood_round_robin.c
  ===================================================================
  RCS file: /home/cvs/httpd-test/flood/flood_round_robin.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- flood_round_robin.c	9 Feb 2004 08:12:56 -0000	1.40
  +++ flood_round_robin.c	18 Mar 2004 18:28:08 -0000	1.41
  @@ -70,6 +70,7 @@
       char *url;
       method_e method;
       char *payload;
  +    char *contenttype;
       apr_int64_t predelay;
       apr_int64_t predelayprecision;
       apr_int64_t postdelay;
  @@ -307,7 +308,7 @@
                                      "Connection: %s" CRLF
                                      "Host: %s" CRLF
                                      "Content-Length: %d" CRLF 
  -                                   "Content-type: application/x-www-form-urlencoded" CRLF
  +                                   "Content-type: %s" CRLF 
                                      "%s"
                                      "%s" CRLF
                                      "%s",
  @@ -317,6 +318,7 @@
                                      r->keepalive ? "Keep-Alive" : "Close",
                                      r->parsed_uri->hostinfo,
                                      r->payloadsize,
  +				   r->contenttype ? r->contenttype : "application/x-www-form-urlencoded", 
                                      authz_hdr ? authz_hdr : "",
                                      cookies,
                                      (char*)r->payload);
  @@ -393,6 +395,10 @@
                                    FLOOD_STRLEN_MAX) == 0) {
                   url->payload = (char*)attr->value;
               }
  +	    else if (strncasecmp(attr->name,XML_URLLIST_CONTENT_TYPE,
  +				 FLOOD_STRLEN_MAX) == 0) {
  +		url->contenttype = (char*)attr->value;
  +	    }
               else if (strncasecmp(attr->name, XML_URLLIST_PREDELAY,
                                    FLOOD_STRLEN_MAX) == 0) {
                   char *endptr;
  @@ -488,6 +494,7 @@
       {
           url->method = GET;
           url->payload = NULL;
  +        url->contenttype = NULL;
       }
   
       return APR_SUCCESS;
  @@ -782,6 +789,12 @@
           r->payload = parse_param_string(rp, 
                                       rp->url[rp->current_url].payloadtemplate);
           r->payloadsize = strlen(r->payload);
  +    }
  +
  +    if (rp->url[rp->current_url].contenttype)
  +    {
  +        r->contenttype = parse_param_string(rp, rp->url[rp->current_url].contenttype);
  +	r->contenttypesize = strlen(r->contenttype);
       }
   
       /* If they want a sleep, do it now. */
  
  
  

Mime
View raw message