Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253142

GZIP "OS" header flag hard-coded to 0 instead of 255 (RFC 1952 non-compliance)

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 16
    • core-libs
    • None
    • behavioral
    • low
    • The default value for the OS field within the GZIP header is specified as 255. The OS field is not used by the java GZIP implementation.
    • File or wire format
    • Implementation

      Summary

      GZIPOutputStream does not write out the correct default value for the GZIP header OS field.

      Problem

      GZIPOutputStream currently sets the OS field in the GZIP header to 0 (which means FAT filesystem) which does not match the default value specified in section 2.3.1.2 of the GZIP file format specification version 4.3 (RFC 1952)

      Solution

      Set the OS header field to 255, the default value, as defined in section 2.3.1.2 of the GZIP file format specification version 4.3 (RFC 1952)

      Specification

      The default value for the OS header field is specified in section 2.3.1.2 of the GZIP file format specification version 4.3 (RFC 1952).

            lancea Lance Andersen
            webbuggrp Webbug Group
            Alan Bateman, Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: