{"action":"opened","issue":{"url":"https://api.github.com/repos/Kyria/EsiPy/issues/40","repository_url":"https://api.github.com/repos/Kyria/EsiPy","labels_url":"https://api.github.com/repos/Kyria/EsiPy/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/Kyria/EsiPy/issues/40/comments","events_url":"https://api.github.com/repos/Kyria/EsiPy/issues/40/events","html_url":"https://github.com/Kyria/EsiPy/issues/40","id":325958389,"number":40,"title":"Header keys changing case","user":{"login":"EricE","id":126238,"avatar_url":"https://avatars2.githubusercontent.com/u/126238?v=4","gravatar_id":"","url":"https://api.github.com/users/EricE","html_url":"https://github.com/EricE","followers_url":"https://api.github.com/users/EricE/followers","following_url":"https://api.github.com/users/EricE/following{/other_user}","gists_url":"https://api.github.com/users/EricE/gists{/gist_id}","starred_url":"https://api.github.com/users/EricE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricE/subscriptions","organizations_url":"https://api.github.com/users/EricE/orgs","repos_url":"https://api.github.com/users/EricE/repos","events_url":"https://api.github.com/users/EricE/events{/privacy}","received_events_url":"https://api.github.com/users/EricE/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-24T04:18:03Z","updated_at":"2018-05-24T04:18:03Z","closed_at":null,"author_association":"NONE","body":"I've been grabbing xx.header['Expires'] to set a timer to scan my orders every 5 minutes.  With 0.4.0, my code is throwing a KeyError because 'Expires' is changing to 'expires'. I think it is happening with headers returned from the cache.\r\n\r\nI looked through client.py and you are doing res.headers.get('expires') frequently but since it is from a case-insensitive dict it is working.  By the time it gets to my code, it is a pyswagger.io.Response which is case sensitive. \r\n\r\nHere are the headers for the first response and request:\r\n  {'Accept': 'application/json'}\r\n\r\n  {'Date': ['Thu, 24 May 2018 03:19:13 GMT'], 'Content-Type': ['application/json; charset=UTF-8'], 'Content-Length': ['641'], 'Connection': ['keep-alive'], 'Access-Control-Allow-Credentials': ['true'], 'Access-Control-Allow-Headers': ['Content-Type,Authorization,If-None-Match,X-User-Agent'], 'Access-Control-Allow-Methods': ['GET,HEAD,OPTIONS'], 'Access-Control-Allow-Origin': ['*'], 'Access-Control-Expose-Headers': ['Content-Type,Warning,ETag,X-Pages,X-ESI-Error-Limit-Remain,X-ESI-Error-Limit-Reset'], 'Access-Control-Max-Age': ['600'], 'Allow': ['GET,HEAD,OPTIONS'], 'Cache-Control': ['public'], 'Content-Encoding': ['gzip'], 'Etag': ['\"e15db176cd7960d74a0770861a4d5b444fadcbf2843e10e8bc2317ee\"'], 'Expires': ['Thu, 24 May 2018 03:24:12 GMT'], 'Last-Modified': ['Thu, 24 May 2018 03:19:12 GMT'], 'Strict-Transport-Security': ['max-age=31536000'], 'Vary': ['Accept-Encoding'], 'X-Esi-Error-Limit-Remain': ['100'], 'X-Esi-Error-Limit-Reset': ['47'], 'X-Esi-Request-Id': ['485b8a1d-51d1-40b3-b28f-003a019f3bf8'], 'X-Pages': [1]}\r\n\r\nSecond pair:\r\n  {'Accept': 'application/json', 'If-None-Match': '\"e15db176cd7960d74a0770861a4d5b444fadcbf2843e10e8bc2317ee\"'}\r\n\r\n  {'date': ['Thu, 24 May 2018 03:24:14 GMT'], 'Content-Type': ['application/json; charset=UTF-8'], 'Content-Length': ['641'], 'Connection': ['keep-alive'], 'Access-Control-Allow-Credentials': ['true'], 'Access-Control-Allow-Headers': ['Content-Type,Authorization,If-None-Match,X-User-Agent'], 'Access-Control-Allow-Methods': ['GET,HEAD,OPTIONS'], 'Access-Control-Allow-Origin': ['*'], 'Access-Control-Expose-Headers': ['Content-Type,Warning,ETag,X-Pages,X-ESI-Error-Limit-Remain,X-ESI-Error-Limit-Reset'], 'Access-Control-Max-Age': ['600'], 'Allow': ['GET,HEAD,OPTIONS'], 'Cache-Control': ['public'], 'Content-Encoding': ['gzip'], 'Etag': ['\"e15db176cd7960d74a0770861a4d5b444fadcbf2843e10e8bc2317ee\"'], 'expires': ['Thu, 24 May 2018 03:29:13 GMT'], 'Last-Modified': ['Thu, 24 May 2018 03:19:12 GMT'], 'Strict-Transport-Security': ['max-age=31536000'], 'Vary': ['Accept-Encoding'], 'X-Esi-Error-Limit-Remain': ['100'], 'X-Esi-Error-Limit-Reset': ['47'], 'X-Esi-Request-Id': ['485b8a1d-51d1-40b3-b28f-003a019f3bf8'], 'X-Pages': [1]}\r\n\r\nNote that 'Expires' has gone to 'expires' in the response.  \r\n\r\nIt looks like it happens in client.py here:\r\n   if res.status_code == 304 and cached_response is not None:\r\n     cached_response.headers['expires'] = res.headers.get('expires')\r\n     cached_response.headers['date'] = res.headers.get('date')\r\n     return cached_response\r\n\r\nCan this be changed to 'Expires' (and maybe date too)?"}}
{"actor":{"display_login":"EricE"}}