commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpParser.java
Date Mon, 24 Mar 2003 19:18:04 GMT
olegk       2003/03/24 11:18:04

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpParser.java
  Log:
  Fixes NullPointerException in HttpParser.parseHeaders(InputStream)
  
  Contributed by Oleg Kalnichevski
  
  Revision  Changes    Path
  1.5       +4 -2      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpParser.java
  
  Index: HttpParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HttpParser.java	24 Mar 2003 18:39:41 -0000	1.4
  +++ HttpParser.java	24 Mar 2003 19:18:04 -0000	1.5
  @@ -118,8 +118,10 @@
               if ((line.charAt(0) == ' ') || (line.charAt(0) == '\t')) {
                   // we have continuation folded header
                   // so append value
  -                value.append(' ');
  -                value.append(line.trim());
  +                if (value != null) {
  +                    value.append(' ');
  +                    value.append(line.trim());
  +                }
               } else {
                   // make sure we save the previous name,value pair if present
                   if (name != null) {
  
  
  

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


Mime
View raw message