hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharat Viswanadham (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDDS-820) Use more strict data format for the Last-Modified headers of s3 gateway
Date Wed, 21 Nov 2018 18:44:00 GMT

    [ https://issues.apache.org/jira/browse/HDDS-820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16695096#comment-16695096

Bharat Viswanadham commented on HDDS-820:

[~elek] Patch is not applying to trunk, it needs a rebase.


> Use more strict data format for the Last-Modified headers of s3 gateway
> -----------------------------------------------------------------------
>                 Key: HDDS-820
>                 URL: https://issues.apache.org/jira/browse/HDDS-820
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>          Components: S3
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>             Fix For: 0.4.0
>         Attachments: HDDS-820.001.patch, HDDS-820.002.patch, HDDS-820.003.patch
> The format of HTTP Last-Modified header is defined by rfc-1123 (which updates the earlier
> From https://tools.ietf.org/html/rfc1123
> {code}
>    5.2.14  RFC-822 Date and Time Specification: RFC-822 Section 5
>          The syntax for the date is hereby changed to:
>             date = 1*2DIGIT month 2*4DIGIT
> {code}
> From https://tools.ietf.org/html/rfc822
> {code}
>           The character "*" preceding an element indicates repetition.
>      The full form is:
>                               <l>*<m>element
>      indicating at least <l> and at most <m> occurrences  of  element.
>      Default values are 0 and infinity so that "*(element)" allows any
>      number, including zero; "1*element" requires at  least  one;  and
>      "1*2element" allows one or two.
> {code}
> It means that both of the following dates are good:
> * Wed, 07 Nov 2018 10:31:05 GMT (two digits day)
> * Wed, 7 Nov 2018 10:31:05 GMT (one digits day)
> Java implements it in the right way in DateTimeFormatter.RFC_1123_DATE_TIME, it sets
the minimum and maximum size of the day field (1-2)
> Golang follows a different way to define the date format, there is a fixed date which
should be used as an example format which will be followed.
> http.TimeFormat (in golang) defines the format of the HTTP date:
> From https://golang.org/src/time/format.go
> {code}
> 	RFC1123     = "Mon, 02 Jan 2006 15:04:05 MST"
> {code}
> Base on this definition the day also should be two digits.
> *Summary*: As rfc1123 allows the usage of both format I propose two use the two digit
days all the time, to make it possible to use the s3g from golang.
> Note: this is required as the CTrox/csi-s3 driver uses the golang base minio s3 client
to create/get/list buckets before mounting it with fuse drivers.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message