-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Konstantin,

On 2/12/15 11:52 AM, Konstantin Kolinko wrote:
> 2015-02-12 19:43 GMT+03:00 Christopher Schultz
> <[email protected]>:
>> 
>> All,
>> 
>> I've been trying to find some information online about how to do
>> this, and maybe I'm just being bad search terms.
>> 
>> I've not yet played-around with any code for this, but I'm
>> interested in observing the server's response to an Expect:
>> 100-continue header when a request has a body (e.g. PUT, POST,
>> etc.).
>> 
>> This is from an HTTP client's perspective, and I've got code
>> that already uses HttpURLConnection to open a connection and
>> stream a body if requested. Before streaming the body, I'd like
>> my code to take a look at the server's response and maybe make
>> some decision based upon that. For instance, if the server
>> replies with "417 Expectation Failed" then I'd like to maybe
>> throw some kind of exception, or maybe .. I dunno, compress the
>> request to see if the body is small enough to re-try.
>> 
>> Anyhow, I don't see anything in the API that directly supports
>> this, and I haven't found anything online about how to do this
>> in HttpURLConnection other than the obvious setting of the HTTP
>> header. Is this something that HttpURLConnection does not expose
>> to the programmer? Does it simply handle the situation on its
>> own?
>> 
> 
> See the following recent BZ issue for a link 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=57530

Thanks. From my reading of that, the answer is "you can't do what you
want to do". I'll play around with what happens with 417.

I'm almost certainly not going to abandon HttpURLConnection and deal
with the socket directly. :)

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3gN/AAoJEBzwKT+lPKRY0pQP/jGYycc/jNu6z2Tk5CReBv3T
7IOT0QtRmTx8/6O3hjCXbGCXTYPTaDZTKW4uP4r/BGvvzJpRsXj7KwzlVWxEeSw3
OEJyinCstCL1tcOrN0Rvc5CH/2X/k8iLVEp/7YSrC0k8pvm3mNU/mzqilN54Z2vY
Fq3SBZUqxhRkUXyq1VPsWA1EZcUnH378E1E+FJi0znPExCH+wSRXYvMCMIwOEaEw
OAB7Xf5ocBxPWGg6AEuCspQh1Xp4oUxct2O9EslmQwxA++nT8ypVj2QL7krcZIeI
oR9z3vPJVWbxHNL2V4B6rvEjdv6BlNoI72Ym6Xt1A8Ss0nqdkqB/VipiYXBIxmOe
uy++MzCegq+eleHGDlWLtV7nIq2OgGnP8P0fdIpq8qY5hIul6RlbURr1EtwZSzcj
7mHhFU2h1WEgw8PzIVu/dATwXiPoQQAU5tasZnwyny1hIWuN46jRTsvvHtemICsM
OxepL0JttfgDYN9KLBuwZySZm4O9OW2MxC0qoGXdv4v8g/9qJYLmQoi2aa9CeuuL
xYfqtAiZbOs8Pl+M5ffbNFWL3E4WrOTjR9OlFr51hj4Q5b9nnzZNi+p2uioPhfgE
GdbwEOQqkubOFOVAq9ilvjMY5T9UQmabyYQeSYGI3o6e1AAusiOKG/96PQifTp9M
qRAu1f5vdFWuqjhuwUdH
=MRJR
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to