cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Digest authentication

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 30 Mar 2005 20:05:05 +0200 (CEST)

On Wed, 30 Mar 2005, Tom Moers wrote:

> I've tried the fix and now I get the following when I post less than 2000
> bytes of data with digest authentication:

I was confusing things when I mentioned that 2000 bytes limit. It only applies
to NTLM, not Digest.

> > empty post
> < 401 Authorization required
> > post data
> < 200 OK
> This all happens in one connection.

This is all goodness then!

> If I post more than 2000 bytes of data with digest
> authentication enabled:
> > empty post
> < 401 Authorization required
> > post
> expect: 100-continue
> < 100 Continue
> > continue with data
> < 200 OK
> This too happens in one connection.
>
> Why is the expect: 100-continue sent when the data is larger than 2000? And
> where in the code is this checked, because I can't seem to find it?

The difference here is that if the size of the POST is small (<
MAX_INITIAL_POST_SIZE), libcurl sends all headers and the body in one chunk
and then it doesn't bother with the Expect: header.

If the POST is larger than that magic limit, it includes that header.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-03-30