Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS CLI HTTP Proxy issue for S3 #1116

Closed
jamesls opened this issue Jan 28, 2015 · 0 comments · Fixed by boto/botocore#445
Closed

AWS CLI HTTP Proxy issue for S3 #1116

jamesls opened this issue Jan 28, 2015 · 0 comments · Fixed by boto/botocore#445
Labels
bug This issue is a bug. s3

Comments

@jamesls
Copy link
Member

jamesls commented Jan 28, 2015

When using an HTTP (not an HTTPS) proxy, we do not handle the case where the proxy server will send headers along with the 100 continue response when we set the Expect header in our request. This only happens for specific S3 operations, but when using these S3 commands, the AWS CLI will hang and eventually exit with a timeout exception:

     Expect: 100-continue  (same)
CLI     ->           SQUID         ->              S3
     HTTP/1.1 100 Continue      HTTP/1.1 100 Continue
     Connection: keep-alive
CLI     <-           SQUID         <-               S3

     object body                object body
CLI     ->           SQUID         ->               S3
      200 OK                     200 OK
CLI     <-           SQUID         <-               S3

Note how from SQUID to CLI a Connection: keep-alive is injected in the proxies response.

@jamesls jamesls added bug This issue is a bug. confirmed s3 labels Jan 28, 2015
jamesls added a commit to jamesls/botocore that referenced this issue Jan 28, 2015
Most servers (including S3) will just return the CLRF after the 100
continue response.  However, some servers (I've specifically seen this
for squid when used as a straight HTTP proxy) will also inject a
Connection: keep-alive header.  To account for this we'll read until we
read '\r\n', and ignore any headers that come immediately after the 100
continue response.

Fixes aws/aws-cli#1116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. s3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant