Bug Report Checklist
Description
The java jersey2 library is incorrectly setting the Date header. The date format should be compliant with RFC 7231, which states the time must be set to GMT.
According to RFC 7231, the "Date" header field represents the date and time at which the message was originated. The field value is an HTTP-date, as defined in Section 7.1.1.1. The preferred format is a fixed-length and single-zone subset of the date and time specification used by the Internet Message Format.
IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT
For example, the jersey2 library sets the Date header to Mon, 13 Jul 2020 09:47:14 PDT.
Expected Output: Mon, 13 Jul 2020 17:47:14 GMT
Instead, getting: Mon, 13 Jul 2020 09:47:14 PDT
The date format is set to RFC3339 by default in the generated ApiClient.java. This is the right default value for serialized dates in the HTTP body, but the Date header should be compliant with RFC 7231 format, which is RFC1123.
openapi-generator version
master July 13 2020
OpenAPI declaration file content or url
There is no applicable OpenAPI document. This is a problem setting the value of the Date HTTP header.
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix
The bug is here:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache#L239
Bug Report Checklist
Description
The java jersey2 library is incorrectly setting the
Dateheader. The date format should be compliant with RFC 7231, which states the time must be set to GMT.According to RFC 7231, the "Date" header field represents the date and time at which the message was originated. The field value is an HTTP-date, as defined in Section 7.1.1.1. The preferred format is a fixed-length and single-zone subset of the date and time specification used by the Internet Message Format.
For example, the jersey2 library sets the
Dateheader toMon, 13 Jul 2020 09:47:14 PDT.Expected Output:
Mon, 13 Jul 2020 17:47:14 GMTInstead, getting:
Mon, 13 Jul 2020 09:47:14 PDTThe date format is set to RFC3339 by default in the generated ApiClient.java. This is the right default value for serialized dates in the HTTP body, but theDateheader should be compliant with RFC 7231 format, which is RFC1123.openapi-generator version
master July 13 2020
OpenAPI declaration file content or url
There is no applicable OpenAPI document. This is a problem setting the value of the
DateHTTP header.Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix
The bug is here:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache#L239