100-Continue Handling

25 views
Skip to first unread message

Aleh Hanin

unread,
Jun 23, 2011, 7:29:26 AM6/23/11
to Kayak HTTP
Hi,

Can you please explan how to respond to client with 100 Continue
status (when it expects that), then process the POST request normally
and return actual server HTTP response back.

Now the second call on responseDelegate.OnResponse(head, body) throws
InvalidOperationException telling that the response has been already
sent.

Benjamin van der Veen

unread,
Jun 23, 2011, 12:40:32 PM6/23/11
to kayak...@googlegroups.com

I was actually just working on adding this functionality last night.
:) When you connect to the request body provided to your request
delegate, the implementation will send 100-Continue at that time.
There is no need to explicitly send the 100-Continue status other than
by indicating that you are interested in the request body by
connecting an IDataConsumer to it.

Many HTTP clients which send the Expect: continue header with their
request will wait up to a certain amount of time (often 200-500ms) for
the server to respond with the 100-Continue status, and if they don't
receive it within that time period, they will assume the server
doesn't support the expectation and will continue sending the request
body anyway. So, until the 100-Continue functionality is implemented
in Kayak, everything should work, just with a slight delay.

Does this help?

Benjamin

Reply all
Reply to author
Forward
0 new messages