You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2004/04/13 19:28:57 UTC

cvs commit: jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler PostWriter.java HTTPSampler2.java

sebb        2004/04/13 10:28:57

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/proxy Tag:
                        rel-2_0 HttpReplyHdr.java
               src/protocol/http/org/apache/jmeter/protocol/http/sampler
                        Tag: rel-2_0 PostWriter.java HTTPSampler2.java
  Log:
  Use standard case for header lines (see bugzilla 28309)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.5.2.1   +7 -7      jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpReplyHdr.java
  
  Index: HttpReplyHdr.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpReplyHdr.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- HttpReplyHdr.java	12 Feb 2004 00:29:50 -0000	1.5
  +++ HttpReplyHdr.java	13 Apr 2004 17:28:56 -0000	1.5.2.1
  @@ -59,7 +59,7 @@
   
           if (0 < contentType.length())
           {
  -            out.append("Content-type: ").append(contentType).append(CR);
  +            out.append("Content-Type: ").append(contentType).append(CR);
           }
           else
           {
  @@ -106,15 +106,15 @@
        */
       private static String formError(String error, String description)
       {
  -        /* A HTTP RESPONCE HEADER LOOKS ALOT LIKE:
  +        /* A HTTP RESPONSE HEADER LOOKS ALOT LIKE:
            *
            * HTTP/1.0 200 OK
            * Date: Wednesday, 02-Feb-94 23:04:12 GMT
            * Server: NCSA/1.1
            * MIME-version: 1.0
            * Last-modified: Monday, 15-Nov-93 23:33:16 GMT
  -         * Content-type: text/html
  -         * Content-length: 2345
  +         * Content-Type: text/html
  +         * Content-Length: 2345
            * \r\n
            */
   
  @@ -124,7 +124,7 @@
           header.append(HTTP_PROTOCOL).append(" ").append(error).append(CR);
           header.append("Server: ").append(HTTP_SERVER).append(CR);
           header.append("MIME-version: 1.0").append(CR);
  -        header.append("Content-type: text/html").append(CR);
  +        header.append("Content-Type: text/html").append(CR);
   
           header.append("Content-Length: ").append(body.length()).append(CR);
   
  
  
  
  No                   revision
  No                   revision
  1.12.2.1  +5 -6      jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java
  
  Index: PostWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- PostWriter.java	12 Feb 2004 00:29:49 -0000	1.12
  +++ PostWriter.java	13 Apr 2004 17:28:56 -0000	1.12.2.1
  @@ -32,7 +32,6 @@
   import org.apache.jmeter.testelement.property.PropertyIterator;
   
   /**
  - * @author Michael Stover
    * @version $Revision$
    */
   
  @@ -100,7 +99,7 @@
           if ((filename != null) && (filename.trim().length() > 0))
           {
               connection.setRequestProperty(
  -                "Content-type",
  +                "Content-Type",
                   "multipart/form-data; boundary=" + BOUNDARY);
               connection.setDoOutput(true);
               connection.setDoInput(true);
  @@ -111,10 +110,10 @@
           {
               String postData = sampler.getQueryString();
               connection.setRequestProperty(
  -                "Content-length",
  +                "Content-Length",
                   "" + postData.length());
               connection.setRequestProperty(
  -                "Content-type",
  +                "Content-Type",
                   "application/x-www-form-urlencoded");
               connection.setDoOutput(true);
           }
  
  
  
  1.8.2.1   +4 -4      jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
  
  Index: HTTPSampler2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- HTTPSampler2.java	24 Mar 2004 03:05:19 -0000	1.8
  +++ HTTPSampler2.java	13 Apr 2004 17:28:56 -0000	1.8.2.1
  @@ -181,7 +181,7 @@
   	            + encode(filename)
   	            + "\"");
               // Specify content type and encoding
  -            post.setRequestHeader("Content-type", sampler.getMimetype());
  +            post.setRequestHeader("Content-Type", sampler.getMimetype());
               post.setRequestBody(new FileInputStream(input));
           }
       }
  @@ -527,7 +527,7 @@
   
               res.setResponseMessage(httpMethod.getStatusText());
   
  -            String ct= httpMethod.getResponseHeader("Content-type").getValue();
  +            String ct= httpMethod.getResponseHeader("Content-Type").getValue();
               res.setContentType(ct);// e.g. text/html; charset=ISO-8859-1
               if (ct != null)
               {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org