[prev in list] [next in list] [prev in thread] [next in thread] 

List:       avalon-cvs
Subject:    cvs commit: avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl HTTPClientSourc
From:       crafterm () apache ! org
Date:       2003-07-30 12:22:17
[Download RAW message or body]

crafterm    2003/07/30 05:22:17

  Modified:    sourceresolve/src/java/org/apache/excalibur/source/impl
                        HTTPClientSource.java
  Log:
  Fixed NPE thrown when communicating with HTTP servers that don't return
  the Content-Type header in a response.
  
  Revision  Changes    Path
  1.7       +3 -2      \
avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/HTTPClientSource.java
  
  Index: HTTPClientSource.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/HTTPClientSource.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HTTPClientSource.java	14 Jul 2003 12:41:37 -0000	1.6
  +++ HTTPClientSource.java	30 Jul 2003 12:22:17 -0000	1.7
  @@ -564,7 +564,8 @@
       {
           // REVISIT: should this be the mime-type, or the content-type -> URLSource
           // returns the Content-Type, so we'll follow that for now.
  -        m_mimeType = method.getResponseHeader( CONTENT_TYPE ).getValue();
  +        final Header header = method.getResponseHeader( CONTENT_TYPE );
  +        m_mimeType = header == null ? null : header.getValue();
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic