Closed Bug 1467554 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 11382 - Fix the TemporaryFile mode to prevent crashing.

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 11382 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/11382
Details from upstream follow.

David Heiberg <dheiberg@mozilla.com> wrote:
>  Fix the TemporaryFile mode to prevent crashing.
>  
>  In `request.py`, if a remote file is bigger than the given `max_buffer_size`, it will use a [TemporaryFile](https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryFile). The mode for this tempfile caused an error `IOError: [Errno 9] Bad file descriptor` to happen on line 84. Removing this mode and using the default `w+b` fixes this.
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d5fed1922dd
[wpt PR 11382] - Fix the TemporaryFile mode to prevent crashing., a=testonly
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/73b0e112fdfc
[wpt PR 11382] - Fix the TemporaryFile mode to prevent crashing., a=testonly
https://hg.mozilla.org/mozilla-central/rev/73b0e112fdfc
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Result changes from PR not available.
You need to log in before you can comment on or make changes to this bug.