cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSL and basic authentication.

From: Josef Wolf <jw_at_raven.inka.de>
Date: Thu, 30 Oct 2008 00:27:00 +0100

On Tue, Oct 28, 2008 at 11:28:15PM +0100, Daniel Stenberg wrote:
> On Sat, 25 Oct 2008, Josef Wolf wrote:
>
> >In this spirit, it would be a big win if curl's INTERNALS paper would
> >give a _rough_ overview of the used data structures. It don't need to
> >be much. Just a couple of lines. Something like
>
> I agree. The INTERNALS document was an effort that never really got updated
> much and it's not detailed enough to help a lot.

I am not talking about a detailed description. I am talking about a
rough overview (from 10000 miles distance or so).

> I think a more sensible
> approach is perhaps to make sure the comments in the source code are good
> enough to more or less explain the same things. They're easier to keep
> up-to-date and in sync with the code.

This information (a _rough_ overview, maybe 10..20 lines) is probably
not about to change very often anyway. But hiding this information in
several thousand lines of headers might contradict the intent.

> >At first glance it looks like the functionality I am talking about could
> >be placed in Curl_http_auth_act(). I guess the two clauses that handle
> >401/407 could be extended to retrieve the credentials.
>
> Yeps. That code figures out what auth method to use so it could also get
> the credentials.

OK.

> >But on a second glance, it looks to me like some code and data structures
> >could use some refactoring to improve readability. Please don't get
> >offended, I am not going to criticize. Chances are that it is hard for me
> >to read because I am not familiar with the code and data structures. :-)
>
> Don't worry, I don't think we'll be that easily offended.

Ufff, I was already afraid that I annoyed you :)

> I'm quite sure there are improvements to be done in both code and data
> structures all over. I'll welcome patches. I'm sure a new pair of eyes and
> a fresh interest in the code can shake up both bugs and fixes for them!

OK, I'll take a try.

But first, I'd like to pass the regression tests. So I do with the
unmodified CVS HEAD:

  $ make test
  [ ... ]
  test 558...OK (375 out of 513, remaining: 01:25)
  test 559...*** glibc detected *** free(): invalid pointer: 0x0809fd1c ***
  sh: line 1: 20372 Aborted ./libtest/lib559 nothing >>log/stdout559 2>>log/stderr559
  FAILED
  test 700...OK (415 out of 513, remaining: 01:04)
  [ ... ]
  TESTDONE: 469 tests out of 470 reported OK: 99%
  TESTFAIL: These test cases failed: 559
  TESTDONE: 513 tests were considered during 329 seconds.
  TESTINFO: 43 tests were skipped due to these restraints:
  TESTINFO: "rlimit problem: fds needed 1050 > system limit 1024" 1 times (518)
  TESTINFO: "curl lacks scp support" 10 times (601, 603, 605, 607, 617, 619, 621, 623, 629, 631)
  TESTINFO: "Resolving IPv6 'ip6-localhost' didn't work" 2 times (241, 1083)
  TESTINFO: "openssl engine not supported" 1 times (307)
  TESTINFO: "curl lacks sftp support" 29 times (600, 602, 604, 606, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 622, 624, 625, 626, 627, 628, 630, 632, 633, 634, 635, 636, 637, 2004)
  make[2]: *** [quiet-test] Fehler 1
  make[2]: Leaving directory `/m/s/rep/svn/curl/curl/tests'
  make[1]: *** [test] Fehler 2
  make[1]: Leaving directory `/m/s/rep/svn/curl/curl'
  make: *** [regression] Fehler 2
  $

Any ideas?
Received on 2008-10-30