[New-bugs-announce] [issue27525] Wrong OS header on file created by gzip module

Dor Dankner report at bugs.python.org
Fri Jul 15 17:14:53 EDT 2016


New submission from Dor Dankner:

The gzip module generates files with wrong OS header, by putting "Unknown" OS, instead of checking and filling the user's OS.
>From the gzip RFC (rfc1952): "This identifies the type of file system on which compression took place. This may be useful in determining end-of-line convention for text files."

The following patch contains a fix that fills the current OS flag (and testcase ;) )

* The bug is relevant to python 2.x too, but I did not test the patch on it.
** also, I did not run the testcase on Win/Mac, however it should work.

----------
components: Extension Modules
files: gzip_os_header_fix_and_tests.patch
keywords: patch
messages: 270515
nosy: ddorda
priority: normal
severity: normal
status: open
title: Wrong OS header on file created by gzip module
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43738/gzip_os_header_fix_and_tests.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27525>
_______________________________________


More information about the New-bugs-announce mailing list