cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: issue 12 patch

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sun, 14 Mar 2004 18:55:01 +0100 (CET)

On Sat, 13 Mar 2004, Xiuping Hu wrote:

> I have done the full test of POST for issue 12 patch (I also downloaded the
> March 30 build.).

Are you talking about the March 13 snapshot?

> There are some bugs founded:
>
> 1. Curl put 100 Continue header and Content-Length before success of
> authentication, so the back-end server do not send any data back.

Uh? Of course it sends "Expect: 100-continue" and "Content-Length:" headers
before the authentication has succeeded. That was one of the main ideas with
my issue12 fix.

Why is that a problem? AFAIK, that is RFC2616 compliant and the correct thing
to do for these cases.

> 2. Authenticate header is in the same order as GET, the most IIS server does
> not like this. It requires put the Authenticate header at almost last.

You mean among the headers in a single request?

> I have made a patch, so now it works. As our use cases are quite different
> with most of the people's, so the patch may not exactly is what you need,
> but at least it gives the clues what is wrong and what need to be done.
>
> Attached is the patch against March 30.

You need to tell me more about what problems you try to fix. Your patch has
several flaws:

- syslog() must not be used, infof() is there for you.

- don't use C++ comments

- you haven't commented the code on why it needs to do these oddities

In my eyes (I haven't tried applying the patch), it looks like you've ruined
POST requests completely. Can you elaborate on the check for POST before the
request is sent?

With this applied, do all tests really run fine?

The absolutely best thing for you do to is this:

Write up a test case using the curl test suite, that closely resembles the use
case you have (as close as you can). Then we can work on getting that test
case run fine with both your ideas of how to make things right, and my ideas
on how to keep curl code using curl-style.

I realize this might be some work, but I think this is the best way forward.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-03-14