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

Doesn't handle Expect: 100-Continue #8

Open
therc opened this issue Nov 1, 2016 · 0 comments
Open

Doesn't handle Expect: 100-Continue #8

therc opened this issue Nov 1, 2016 · 0 comments

Comments

@therc
Copy link

therc commented Nov 1, 2016

When e.g. curl sends a request with content length greater than 1024, it also sends an Expect: 100-Continue header.

aws-es-proxy returns the 100 header, but probably does not pass it along to ES, causing a mismatch. Sample trace:

=> Send header, 201 bytes (0xc9)
0000: 50 55 54 20 2f 5f 74 65 6d 70 6c 61 74 65 2f 6b PUT /_template/k
[...]
0040: 30 30 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 00..User-Agent: 
0050: 63 75 72 6c 2f 37 2e 34 33 2e 30 0d 0a 41 63 63 curl/7.43.0..Acc
0060: 65 70 74 3a 20 2a 2f 2a 0d 0a 43 6f 6e 74 65 6e ept: */*..Conten
0070: 74 2d 4c 65 6e 67 74 68 3a 20 31 31 33 34 0d 0a t-Length: 1134..
0080: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 Content-Type: ap
0090: 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77 77 77 2d plication/x-www-
00a0: 66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 65 64 0d form-urlencoded.
00b0: 0a 45 78 70 65 63 74 3a 20 31 30 30 2d 63 6f 6e .Expect: 100-con
00c0: 74 69 6e 75 65 0d 0a 0d 0a                      tinue....
<= Recv header, 23 bytes (0x17)
0000: 48 54 54 50 2f 31 2e 31 20 31 30 30 20 43 6f 6e HTTP/1.1 100 Con
0010: 74 69 6e 75 65 0d 0a                            tinue..
=> Send data, 1134 bytes (0x46e)
0000: 7b 20 20 22 74 65 6d 70 6c 61 74 65 22 3a 20 22 {  "template": "

Error:

The Canonical String for this request should have been
'PUT
/_template/k[...]

accept:*/*
content-length:1134
content-type:application/x-www-form-urlencoded
expect:
host:[...]
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant