[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit HttpUnitOptions.java,1.10,1.11 WebRespons
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2001-10-15 18:26:02
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv7786/src/com/meterware/httpunit
Modified Files:
HttpUnitOptions.java WebResponse.java
Log Message:
Default to no charset on POST, match http-equiv
Index: HttpUnitOptions.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HttpUnitOptions.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- HttpUnitOptions.java 2001/08/21 19:56:22 1.10
+++ HttpUnitOptions.java 2001/10/15 18:25:59 1.11
@@ -44,7 +44,7 @@
_redirectDelay = 0;
_characterSet = DEFAULT_CHARACTER_SET;
_contentType = DEFAULT_CONTENT_TYPE;
- _postIncludesCharset = true;
+ _postIncludesCharset = false;
}
@@ -279,7 +279,7 @@
private static boolean _autoRefresh;
- private static boolean _postIncludesCharset = true;
+ private static boolean _postIncludesCharset = false;
private static int _redirectDelay;
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- WebResponse.java 2001/09/13 15:11:30 1.46
+++ WebResponse.java 2001/10/15 18:25:59 1.47
@@ -521,11 +521,18 @@
private void processMetaTag( ByteTag tag ) {
- if ("content-type".equalsIgnoreCase( tag.getAttribute( "http_equiv" ) )) {
+ if (isHttpEquivMetaTag( tag, "content-type" )) {
inferContentType( tag.getAttribute( "content" ) );
- } else if ("refresh".equalsIgnoreCase( tag.getAttribute( "http_equiv" ) )) {
+ } else if (isHttpEquivMetaTag( tag, "refresh" )) {
readRefreshRequest( tag.getAttribute( "content" ) );
}
+ }
+
+
+ private boolean isHttpEquivMetaTag( ByteTag tag, String headerName )
+ {
+ return headerName.equalsIgnoreCase( tag.getAttribute( "http_equiv" ) ) ||
+ headerName.equalsIgnoreCase( tag.getAttribute( "http-equiv" ) );
}
|