[Webkit-unassigned] [Bug 175533] New: Upload of files with not small size fails on Safari with fetch/xhr

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 14 06:19:58 PDT 2017


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

            Bug ID: 175533
           Summary: Upload of files with not small size fails on Safari
                    with fetch/xhr
           Product: WebKit
           Version: Safari 10
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ebrahim at gnu.org

Safari 10.1.2

Steps to repro:
0. Install a recent version of node.js, perhaps from brew by `brew install nodejs` (needed for the simple server setup)
1. Save content of below script to server.js:

"""
require('http').createServer((req, res) => {
  if (req.method === 'POST')  
    return req
      .on('data', () => undefined)
      .on('end', () => { res.end(req.url + ' uploaded!'); console.log(req.url + ' uploaded!'); })
      .on('close', () => console.log(req.url + ' connection has closed.'));

  res.writeHead(200, { 'Content-Type': 'text/html' });
  res.end(`<input type="file" onchange="
var formData = new FormData();
formData.append('blob', this.files[0], 'file');
fetch(this.files[0].name, { method: 'POST', body: formData }).then(x => x.text()).then(alert, alert);
">`);
}).listen(4040, '127.0.0.1', () => console.log('Listening on http://127.0.0.1:4040/'));
"""

2. Open http://127.0.0.1:4040/ and upload some small files first, then try to do the same with bigger files like 100mb or more, multiple times.


Expected:
Getting "uploaded" alert very consistently each time, like Chrome and Firefox.

Actual:
It works very inconsistently on Safari and gets timeout.

-- 
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/20170814/a92a5cfd/attachment.html>


More information about the webkit-unassigned mailing list