[Feature] Caching proxy uses header 'If-Modified-Since' but that is currently not supported.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Is your feature request related to a problem? Please describe.**
az cli cannot work properly behind a transparent & caching proxy (squid, OPNsense 20.7.3) and reports the following:
```
urllib3.connectionpool : Starting new HTTPS connection (1): graph.windows.net:443
urllib3.connectionpool : https://graph.windows.net:443 "GET /105b2061-b669-4b31-92ac-24d304d195dc/me?api-version=1.6 HTTP/1.1" 400 212
msrest.http_logger : Response status: 400
msrest.http_logger : Response headers:
msrest.http_logger : 'Cache-Control': 'no-cache'
msrest.http_logger : 'Pragma': 'no-cache'
msrest.http_logger : 'Content-Length': '212'
msrest.http_logger : 'Content-Type': 'application/json; odata=minimalmetadata; streaming=true; charset=utf-8'
msrest.http_logger : 'Expires': '-1'
msrest.http_logger : 'ocp-aad-diagnostics-server-name': 'HFGxio4dlffe0IoKJIt7Vjx9d+1k7PqkmEfKx4j79u4='
msrest.http_logger : 'request-id': '0e8d933c-8faa-4a9e-ab15-5b7b301844f3'
msrest.http_logger : 'client-request-id': '6b21bb52-060e-11eb-bd3c-566f5a65000a'
msrest.http_logger : 'x-ms-dirapi-data-contract-version': '1.6'
msrest.http_logger : 'Duration': '5320665'
msrest.http_logger : 'DataServiceVersion': '3.0;'
msrest.http_logger : 'X-AspNet-Version': '4.0.30319'
msrest.http_logger : 'X-Powered-By': 'ASP.NET'
msrest.http_logger : 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger : 'Access-Control-Allow-Origin': '*'
msrest.http_logger : 'Date': 'Sun, 04 Oct 2020 06:54:17 GMT'
msrest.http_logger : 'X-Cache': 'MISS from firewall1.localdomain'
msrest.http_logger : 'X-Cache-Lookup': 'HIT from firewall1.localdomain:3128'
msrest.http_logger : 'Via': '1.1 firewall1.localdomain (squid)'
msrest.http_logger : 'Connection': 'keep-alive'
msrest.http_logger : Response content:
msrest.http_logger : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Header If-Modified-Since is not currently supported."},"requestId":"0e8d933c-8faa-4a9e-ab15-5b7b301844f3","date":"2020-10-04T06:54:18"}}
msrest.exceptions : Header If-Modified-Since is not currently supported.
```
**Describe the solution you'd like**
```
After adding the proxy's CA inside /usr/lib64/az/lib/python3.6/site-packages/certifi/cacert.pem , the az toolset should work behind the proxy.
**Describe alternatives you've considered**
Adding '.windows.net' in the SSL no bump sites or bypassing the proxy.
Contributor guide
Assessment
This issue has not been assessed yet.