Ticket #353 (closed defect: fixed)

Opened 9 months ago

Last modified 4 weeks ago

Improper handling of HTTP "100 Continue" response in cURL backend

Reported by: sszymczy Assigned to: mbensi
Priority: major Milestone: Pukarua
Component: Bug Fix Version: 1.0
Keywords: Cc: jchaffraix
Number of hours worked: % Complete: 00
Number of hours remaining:

Description

While client is sending a request to a server, it may respond with interim "100 Continue" response which means that server received a part of the request and is ready for more. Currently cURL network backend in OWB reacts inappropriately to "100 Continue" response by calling didReceiveResponse() with no content type, content length etc.

I found this problem responsible for Yahoo mail sent confirmation screen failing to load and XOOPS CMS forum post message operation failing to redirect properly (for example on http://aros-exec.org).

I guess instead OWB should simply ignore 100 response and wait for the real one which has to follow "100 Continue". Alternatively we could fix the problem by removing from request headers "Expect: 100-continue" that cURL sends by default. I will attach patch with the first solution later.

Attachments

ignore_100_Continue.diff (1.8 kB) - added by sszymczy on 11/02/09 17:38:28.
Ignore 100 Continue response

Change History

06/24/09 17:09:47 changed by jchaffraix

  • cc set to jchaffraix.

A 100-Continue header should be send in response to a POST request (currently PUT is not implemented) and as such I think that you should check that it really is. An ASSERT would be the best solution as it would not slow down the whole method for a corner-case.

I am ok with your fix but I would like to see my previous comments taken into account. Also could you add a comment on why it is necessary to bail out when we receive a 100 response.

11/02/09 17:38:28 changed by sszymczy

  • attachment ignore_100_Continue.diff added.

Ignore 100 Continue response

11/02/09 17:40:38 changed by sszymczy

I added an assertion and some comments in the patch.

11/03/09 15:19:33 changed by jchaffraix

Thanks for following up on this one! The change is great so feel free to commit it with my approval. Note also that the brace should be on the same line as the if per our coding style but it is a minor change. I will commit your fix tomorrow after the merge if you haven't beaten me.

11/04/09 17:24:35 changed by jchaffraix

  • status changed from new to closed.
  • resolution set to fixed.

Committed in r1110. Closing the bug.

02/23/10 15:09:21 changed by sim

decoration Changed 1 year ago by admin

bathtub Changed 1 year ago by admin

solar system Changed 1 year ago by admin

stair parts Changed 1 year ago by admin

solar supply Changed 1 year ago by admin