Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7429273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:56:34+00:00 2026-05-29T08:56:34+00:00

This is a follow up post to some problems I’ve had using Java built

  • 0

This is a follow up post to some problems I’ve had using Java built in com.sun.net.httpserver.HttpServer and an multistep authentication scheme.

I was hinted at, that sending larger data amounts make it impossible for Java clients to receive early “Authorization required”-messages (due to Java blocking I/O).

Thats the reason why HTTP defines the “expect-continue handshake” involving 100 status code (RFC 2616):

The purpose of the 100 (Continue) status is to allow a client that is
sending a request message with a request body to determine if the
origin server is willing to accept the request (based on the request
headers) before the client sends the request body. In some cases, it
might either be inappropriate or highly inefficient for the client to
send the body if the server will reject the message without looking at
the body.

So in this case it is not appropriate to send the data. The server…

MUST either respond with 100 (Continue) status and continue to read
from the input stream, or respond with a final status code.

Unfortunately the Sun HttpServer always responds with a 100 status code without involving the application. Looking at the source:

/* check if client sent an Expect 100 Continue.
 * In that case, need to send an interim response.
 * In future API may be modified to allow app to
 * be involved in this process.
 */
String exp = headers.getFirst("Expect");
if (exp != null && exp.equalsIgnoreCase ("100-continue")) {
    logReply (100, requestLine, null);
    sendReply (
        Code.HTTP_CONTINUE, false, null
    );
}

When the application is not involved, its seems to be not possible to communicate the client that it is inappropriate to send its message thus the protocol is violated (which really leads to problems like early closed connections and broken pipes). Just in case I’m missing something, I better ask the community if this interpretation is right 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:56:35+00:00Added an answer on May 29, 2026 at 8:56 am

    I wouldn’t say it is violating the protocol, because communicating between the server and the application is not part of the protocol, only communicating between the server and the client. As long as the server accepts the entire client request after sending a 100-Continue, the protocol is respected.

    Of course, automatically returning the 100-Continue means you lose the potential efficiency gain that Expect-Continue is intended to provide, but efficiency is not what the protocol guarantees.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to follow this tutorial http://damianm.com/tech/nhibernate-mvc-and-ninject/ but I am running into some
I follow this rule but some of my colleagues disagree with it and argue
I want to include Core Location and I'm trying to follow this tutorial: http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/
I've editted this post based on recommendation by a fellow user. My specific problems
This is follow up post where I'm having a problem where my php code
I am using VS c++ 6.0. I have read that 6.0 has some problems
Update: Check out this follow-up question: Gem Update on Windows - is it broken?
Trying to follow this example. (Section String sorting...) Is there anything obvious that would
I tried to follow this but the default modelbinder let my array null on
I am trying to follow this tutorial on how to connect to a database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.