in reply to HTTP::DAV changing auth creds?

Grrr... I've got the authentication to work, but I am now getting "Internal Server Error" responses. The URLs I am trying work just fine when entered in a browser. :(

Replies are listed 'Best First'.
Re^2: HTTP::DAV changing auth creds?
by cosimo (Hermit) on Aug 06, 2009 at 18:19 UTC
    Hi there, I'm working on this issue, there's a ticket already opened in the bug tracker for HTTP::DAV. I believe at least 2 tickets have to do with this problem now. The code you posted will help me in trying to reproduce the problem and eventually fix it, I hope, so thank you.
      Hi , I am trying to get HTTP::DAV (v0.31) to connect to a https: site which is Dav enabled. The client that I am connecting from is HP-UX. Though I set the password using the credential() method, the program is giving an authetication failure. Please let me know 1) Is there some configuration in the Client side that needs to be set to enable the correct credentials 2)Is version 0.31 having a bug which does not allow the connection to happen TIA Raj
        Hi Any solution for the above described problem... How to resolve in the code
Re^2: HTTP::DAV changing auth creds?
by Anonymous Monk on Aug 06, 2009 at 10:11 UTC
    How did you get the Auth to work? I am having same issue. Please help. Thanks -Laks

      Are you specifying the realm? I've been debugging the code for a while here and the problem (or my problem anyways) is this:

      I specify my credentials like this:

      credentials( -user => 'username', -pass => 'password', -url => 'http://localhost' )

      Now, credentials get stored in a hash like this:

      { 'netloc' => { 'realm' => [ 'username', 'password' ] } }

      By setting the credentials without a realm, it puts them under the default realm, so we end up with:

      { 'localhost' => { 'default' => [ 'username', 'password' ] } }

      The problem is that for some reason after connecting, it discovers the realm name and decides to populate the hash above with an empty set of credentials for the realm:

      { 'localhost' => { 'default' => [ 'username', 'password' ], 'YOUR_REALM' => [ ] } }

      When it goes to retrieve the credentials, it goes in this order:

      { netloc }{ realm } { default }{ realm } { netloc }{ default }

      Since it entered blank credentials for the netloc+realm combination, it grabs those first. Seems like there's something wrong, it probably shouldn't be entering in the blank credentials.