[HtmlUnit] SVN: [14360] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] SVN: [14360] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit

rbri
Revision: 14360
          http://sourceforge.net/p/htmlunit/code/14360
Author:   rbri
Date:     2017-05-04 17:11:30 +0000 (Thu, 04 May 2017)
Log Message:
-----------
FF52

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-04 17:01:22 UTC (rev 14359)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-04 17:11:30 UTC (rev 14360)
@@ -1555,6 +1555,10 @@
     @BrowserFeature({CHROME, FF52, IE})
     XHR_OVERRIDE_MIME_TYPE_BEFORE_SEND,
 
+    /** Indicates that the content charset is used for response parsing. */
+    @BrowserFeature(FF)
+    XHR_USE_CONTENT_CHARSET,
+
     /** Indicates that the request uses the charset from the requesting page. */
     @BrowserFeature(CHROME)
     XHR_USE_DEFAULT_CHARSET_FROM_PAGE,

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java 2017-05-04 17:01:22 UTC (rev 14359)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java 2017-05-04 17:11:30 UTC (rev 14360)
@@ -22,6 +22,7 @@
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_OPEN_ALLOW_EMTPY_URL;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_OPEN_WITHCREDENTIALS_TRUE_IN_SYNC_EXCEPTION;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_OVERRIDE_MIME_TYPE_BEFORE_SEND;
+import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_USE_CONTENT_CHARSET;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_USE_DEFAULT_CHARSET_FROM_PAGE;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_WITHCREDENTIALS_ALLOW_ORIGIN_ALL;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_WITHCREDENTIALS_NOT_WRITEABLE_IN_SYNC_EXCEPTION;
@@ -796,7 +797,7 @@
                         public Charset getContentCharset() {
                             if (charsetNameFinal.isEmpty()
                                     || (charsetFinal == null && getBrowserVersion()
-                                                .hasFeature(XHR_OPEN_WITHCREDENTIALS_TRUE_IN_SYNC_EXCEPTION))) {
+                                                .hasFeature(XHR_USE_CONTENT_CHARSET))) {
                                 return super.getContentCharset();
                             }
                             return charsetFinal;


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop