[ 
https://issues.apache.org/jira/browse/JCLOUDS-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Svetoslav Neykov closed JCLOUDS-1295.
-------------------------------------
    Resolution: Won't Fix

Azure sends invalid {{Expires}} value -1 which jclouds correctly interprets as 
"expired".

Here's the wireshark capture:

{noformat}
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Content-Encoding: gzip
Expires: -1
Vary: Accept-Encoding
x-ms-ratelimit-remaining-subscription-reads: 14998
x-ms-request-id: f6cce7d2-63df-4d29-b03c-c4858e10a8ee
x-ms-correlation-request-id: f6cce7d2-63df-4d29-b03c-c4858e10a8ee
x-ms-routing-request-id: 
WESTEUROPE:20170529T124513Z:f6cce7d2-63df-4d29-b03c-c4858e10a8ee
Strict-Transport-Security: max-age=31536000; includeSubDomains
Date: Mon, 29 May 2017 12:45:13 GMT
Content-Length: 1850
{noformat}

And the corresponding headers log, which works with the already parsed data, 
which explains the different {{Exipres}} format.

{noformat}
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << HTTP/1.1 200 
OK
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << Date: Mon, 29 
May 2017 12:45:13 GMT
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
OkHttp-Received-Millis: 1496061913957
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
OkHttp-Selected-Protocol: http/1.1
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
OkHttp-Sent-Millis: 1496061913849
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << Pragma: 
no-cache
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
Strict-Transport-Security: max-age=31536000; includeSubDomains
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << Vary: 
Accept-Encoding
2017-05-29 15:45:13,958 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
x-ms-correlation-request-id: f6cce7d2-63df-4d29-b03c-c4858e10a8ee
2017-05-29 15:45:13,959 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
x-ms-ratelimit-remaining-subscription-reads: 14998
2017-05-29 15:45:13,959 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
x-ms-request-id: f6cce7d2-63df-4d29-b03c-c4858e10a8ee
2017-05-29 15:45:13,959 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
x-ms-routing-request-id: 
WESTEUROPE:20170529T124513Z:f6cce7d2-63df-4d29-b03c-c4858e10a8ee
2017-05-29 15:45:13,959 DEBUG 107 j.headers [ager-DOccEjYP-24] << 
Cache-Control: no-cache
2017-05-29 15:45:13,959 DEBUG 107 j.headers [ager-DOccEjYP-24] << Content-Type: 
application/json; charset=utf-8
2017-05-29 15:45:13,959 DEBUG 107 j.headers [ager-DOccEjYP-24] << Expires: Thu 
Jan 01 02:00:00 EET 1970
{noformat}

> 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)

Reply via email to