Incorrect handling of HTTP/1.1 "Expect: 100-continue" in HttpURLConnection

Piotr Bzdyl piotr at bzdyl.net
Tue May 7 06:59:22 PDT 2013


Chris,

When I used the URL provided by you I have indeed access to my bug report.
It seems the notification email I got with confirmation of my report
submission provides the misleading URL. Is it possible to fix it in the
notification template?

When I debug the code (using the test case I attached to the bug report),
it doesn't go into the

        if (streaming() && strOutputStream == null) {
            writeRequests();      // <<<< Here
        }

but goes directly to expect100Continue() in:
        if (expectContinue) {
            expect100Continue();
        }



On Tue, May 7, 2013 at 3:52 PM, Chris Hegarty <chris.hegarty at oracle.com>wrote:

> Hi Piotr,
>
> Your bug is accessible at
>   http://bugs.sun.com/view_bug.**do?bug_id=8012625<http://bugs.sun.com/view_bug.do?bug_id=8012625>
>
> From my reading of the code the headers should be sent before waiting for
> the reply to continue.
>
> From sun/net/www/prtotocol/http/**HttpURLConnection:
>
>     getOutputStream() {
>         ....
>         if (!checkReuseConnection())
>             connect();
>
>         boolean expectContinue = false;
>         String expects = requests.findValue("Expect");
>         if ("100-Continue".**equalsIgnoreCase(expects)) {
>             http.setIgnoreContinue(false);
>             expectContinue = true;
>         }
>
>         if (streaming() && strOutputStream == null) {
>             writeRequests();      // <<<< Here
>         }
>
>         if (expectContinue) {
>             expect100Continue();
>         }
>         ....
>
>     }
>
> Are you seeing something different?
>
> -Chris.
>
>
>
> On 05/07/2013 02:25 PM, Piotr Bzdyl wrote:
>
>> Hello,
>>
>> This is my first post to this mailing list so I would like to say "Hi".
>>
>> The reason I subscribed and I am writing is that I believe I have found
>> a bug in sun.*.HttpURLConnection class (in particular how it handles
>> Expect: 100-continue header). I have already submitted a bug at
>> bugs.sun.com <http://bugs.sun.com> but after almost 3 weeks I still
>>
>> cannot access the bug and check its status
>> (http://bugs.sun.com/**bugdatabase/view_bug.do?bug_**id=9001773<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9001773>
>> ).
>>
>> I would like to ask if bugs.sun.com <http://bugs.sun.com> is alive or if
>>
>> it is possible to report the bug in the OpenJDK project or is there any
>> other alternative procedure for submitting bug reports.
>>
>> Best regards,
>> Piotr Bzdyl
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20130507/63002d84/attachment.html 


More information about the net-dev mailing list