dug 02/03/09 05:35:52
Modified: java/src/org/apache/axis/transport/http HTTPSender.java
Log:
get rid of those annoying "bad envelope" errors
Revision Changes Path
1.51 +6 -4 xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
Index: HTTPSender.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- HTTPSender.java 22 Feb 2002 23:39:46 -0000 1.50
+++ HTTPSender.java 9 Mar 2002 13:35:52 -0000 1.51
@@ -455,9 +455,14 @@
}
/*All HTTP headers have been read.*/
+ String contentType = (String) headers.get(
+ HTTPConstants.HEADER_CONTENT_TYPE.toLowerCase());
+ contentType= (null == contentType )? null:contentType.trim();
+
if (returnCode > 199 && returnCode < 300) {
// SOAP return is OK - so fall through
- } else if (returnCode > 499 && returnCode < 600) {
+ } else if (!contentType.equals("text/html") &&
+ (returnCode > 499 && returnCode < 600) ) {
// SOAP Fault should be in here - so fall through
} else {
// Unknown return code - so wrap up the content into a
@@ -477,9 +482,6 @@
}
if ( b != -1 ) { //more data than just headers.
- String contentType = (String) headers.get(
- HTTPConstants.HEADER_CONTENT_TYPE.toLowerCase());
- contentType= (null == contentType )? null:contentType.trim();
String contentLocation = (String) headers.get(
HTTPConstants.HEADER_CONTENT_LOCATION.toLowerCase());