commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oglu...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestStatusLine.java
Date Fri, 18 Oct 2002 09:18:21 GMT
oglueck     2002/10/18 02:18:21

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        StatusLine.java
               httpclient/src/test/org/apache/commons/httpclient
                        TestStatusLine.java
  Log:
  Fixed reason phrase parsing in status line
  
  Revision  Changes    Path
  1.3       +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/StatusLine.java
  
  Index: StatusLine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/StatusLine.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StatusLine.java	5 Sep 2002 04:48:43 -0000	1.2
  +++ StatusLine.java	18 Oct 2002 09:18:21 -0000	1.3
  @@ -152,7 +152,7 @@
           //handle the Reason-Phrase
           try {
               if (to < length) {
  -                if (statusLine.endsWith("\n\r")) {
  +                if (statusLine.endsWith("\r\n")) {
                       this.reasonPhrase = statusLine.substring(to+1, length-2);
                   } else {
                       this.reasonPhrase = statusLine.substring(to+1);
  
  
  
  1.2       +5 -5      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestStatusLine.java
  
  Index: TestStatusLine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestStatusLine.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestStatusLine.java	5 Sep 2002 00:21:57 -0000	1.1
  +++ TestStatusLine.java	18 Oct 2002 09:18:21 -0000	1.2
  @@ -114,7 +114,7 @@
           assertEquals("Non Trouvé", statusLine.getReasonPhrase());
   
           //its ok to end with a \n\r
  -        statusLine = new StatusLine("HTTP/1.1 404 Not Found\n\r");
  +        statusLine = new StatusLine("HTTP/1.1 404 Not Found\r\n");
           assertEquals("Not Found", statusLine.getReasonPhrase());
   
           //this is valid according to the Status-Line BNF
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message