[
https://issues.apache.org/jira/browse/JCLOUDS-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16028375#comment-16028375
]
ASF subversion and git services commented on JCLOUDS-1295:
----------------------------------------------------------
Commit db4f191b5f8a4d2e77e999f3f6824b2e531bb5e8 in jclouds's branch
refs/heads/2.0.x from [~nacx]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=db4f191 ]
JCLOUDS-1295: Support deprecated date formats in the Expires header
> Azure ARM Improve "Expires" header handling
> -------------------------------------------
>
> Key: JCLOUDS-1295
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1295
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-compute
> Affects Versions: 2.0.1
> Reporter: Svetoslav Neykov
> Assignee: Ignasi Barrera
> Labels: azurecompute-arm
>
> Each response contains the header
> {noformat}
> Expires: Thu Jan 01 02:00:00 EET 1970
> {noformat}
> which results in the debug message
> {noformat}
> Invalid Expires header (-1); should be in RFC-1123 format; treating as
> already expired: Error parsing data at 0
> {noformat}
> While in the end it does the right thing, would be nicer if the header is
> parsed correctly. Couldn't figure out how it goes from the date in the header
> to "{{-1}}".
> Here's a complete request-response pair.
> {noformat}
> 2017-05-12 12:34:30,102 DEBUG 106 j.headers [ager-NxN8ADpS-22] >> GET
> https://management.azure.com/subscriptions/<subscription
> id>/locations?api-version=2015-11-01 HTTP/1.1
> 2017-05-12 12:34:30,102 DEBUG 106 j.headers [ager-NxN8ADpS-22] >> Accept:
> application/json
> 2017-05-12 12:34:30,244 DEBUG 106
> o.j.i.ContentMetadataCodec$DefaultContentMetadataCodec [ager-NxN8ADpS-22]
> Invalid Expires header (-1); should be in RFC-1123 format; treating as
> already expired: Error parsing data at 0
> 2017-05-12 12:34:30,245 DEBUG 106 o.j.h.o.OkHttpCommandExecutorService
> [ager-NxN8ADpS-22] Receiving response -126171253: HTTP/1.1 200 OK
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] << HTTP/1.1
> 200 OK
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] << Date: Fri,
> 12 May 2017 09:34:29 GMT
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> OkHttp-Received-Millis: 1494581670244
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> OkHttp-Selected-Protocol: http/1.1
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> OkHttp-Sent-Millis: 1494581670103
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] << Pragma:
> no-cache
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> Strict-Transport-Security: max-age=31536000; includeSubDomains
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] << Vary:
> Accept-Encoding
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> x-ms-correlation-request-id: f1b11eb2-c5bf-4500-9e70-08f0fbea71b8
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> x-ms-ratelimit-remaining-subscription-reads: 14815
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> x-ms-request-id: f1b11eb2-c5bf-4500-9e70-08f0fbea71b8
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> x-ms-routing-request-id:
> CANADAEAST:20170512T093430Z:f1b11eb2-c5bf-4500-9e70-08f0fbea71b8
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> Cache-Control: no-cache
> 2017-05-12 12:34:30,245 DEBUG 106 j.headers [ager-NxN8ADpS-22] <<
> Content-Type: application/json; charset=utf-8
> 2017-05-12 12:34:30,246 DEBUG 106 j.headers [ager-NxN8ADpS-22] << Expires:
> Thu Jan 01 02:00:00 EET 1970
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)