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

Chris Hegarty chris.hegarty at oracle.com
Tue May 7 06:52:35 PDT 2013


Hi Piotr,

Your bug is accessible at
   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).
>
> 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



More information about the net-dev mailing list