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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]