http content length - cURL failing on some input. What is Expect: 100-continue? -
probably, question asked , answered many times couldn't find simple comprehensive explanations. don't want disable until understand problem. understand, in principle, expect: 100
, waiting http1.1 100 continue
performed let other side decide if needs remainder of content.
what , for? understand correctly? giving client ability control data flow reason why done?
other question why curl failing? server fault sends http1.1 200 ok
before client sends data?
[george@***** ***]$ curl -x post -d @test/curl/json/interact.json localhost/api/interact -v * connect() localhost port 80 (#0) * trying 127.0.0.1... connected * connected localhost (127.0.0.1) port 80 (#0) > post /api/interact http/1.1 > user-agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 nss/3.19.1 basic ecc zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > host: localhost > accept: */* > content-length: 3854 > content-type: application/x-www-form-urlencoded > expect: 100-continue > < http/1.1 100 continue < http/1.1 200 ok < server: nginx/1.9.14 < date: tue, 19 apr 2016 06:49:50 gmt < content-type: application/json < transfer-encoding: chunked < connection: keep-alive < x-frame-options: sameorigin < * transfer closed outstanding read data remaining * closing connection #0 curl: (18) transfer closed outstanding read data remaining
the problem depends on input file use. curl doesn't try use expect: 100
on smaller files:
[george@***** ***]$ curl -x post -d @test/curl/json/interact-smaller.json * connect() localhost port 80 (#0) * trying 127.0.0.1... connected * connected localhost (127.0.0.1) port 80 (#0) > post /api/interact http/1.1 > user-agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 nss/3.19.1 basic ecc zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > host: localhost > accept: */* > content-length: 21 > content-type: application/x-www-form-urlencoded > < http/1.1 200 ok < server: nginx/1.9.14 < date: tue, 19 apr 2016 07:03:55 gmt < content-type: application/json < transfer-encoding: chunked < connection: keep-alive < x-frame-options: sameorigin < * connection #0 host localhost left intact * closing connection #0
is because first file bigger in size?
Comments
Post a Comment