[Webkit-unassigned] [Bug 231138] New: XHR with requestType document broken for larger HTML files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 3 08:47:13 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231138

            Bug ID: 231138
           Summary: XHR with requestType document broken for larger HTML
                    files
           Product: WebKit
           Version: Safari 15
          Hardware: All
                OS: Unspecified
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: erik.witt at baqend.com

When requesting HTML documents via XHRHttpRequests the response object is missing even when the request itself was successful.

Ways to reproduce:

1. Go to https://www.decathlon.de
2. In the console execute this code
```
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.open('GET', 'https://www.decathlon.de/browse/c0-alle-sportarten-a-z/c1-fahrrad-welt/c3-mountainbike/_/N-obq78x', true); 
xhr.responseType = 'document';

xhr.addEventListener('readystatechange', () => {
  if (xhr.readyState === 4) {
    console.log('Success')
    console.log('Res: ' + xhr.response)
  }
});

// Handle errors of XHR connection
xhr.addEventListener('error', (e) => {

    console.log('Error', e)
});
xhr.send();
```

3. Observe that the xhr.response is null even though the request was successful.


The same issue is reproducable on a lot of domains but does not happen for all HTML files. It seems to be related to the size of the HTML document though. For example, if you swap the URL in the example above for this one https://www.decathlon.de/p/mountainbike-e-st-520-27-5-zoll-grau-gelb/_/R-p-311400 everything works fine and the response is available.

This issue is highly critical for a lot of our customers. Is there a workaround to still use XHR for those files until there is a fix for the issue?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211003/57e0c48a/attachment-0001.htm>


More information about the webkit-unassigned mailing list