[Mono-bugs] [Bug 549391] Expired Nonce during HTTP RFC 2617 Authentication not handled properly.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Oct 26 10:35:59 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=549391

User david.mcdaniel at wolfnet.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=549391#c2


David McDaniel <david.mcdaniel at wolfnet.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW
      Info Provider|david.mcdaniel at wolfnet.com  |




--- Comment #2 from David McDaniel <david.mcdaniel at wolfnet.com>  2009-10-26 08:35:58 MDT ---
I don't know the library well enough to know if it hits
request.PreAuthenticate. I'm using an HttpWebResponse. While I can not provide
the server to test against I can give you the code so you can see the
methodology:

public bool Login()
{
    bool success = true;

    UriBuilder tempBuilder = new UriBuilder(this.LoginURL);

    this.BaseURL = tempBuilder.Host;
    if (tempBuilder.Port != -1 && tempBuilder.Port != 80)
    {
        this.BaseURL = this.BaseURL + ":" + tempBuilder.Port;
    }

    cookieJar = new CookieCollection();
    loginInfo = new NetworkCredential(this.UserName, this.Password);

    try
    {
        Uri page = new Uri(this.LoginURL);
        HttpWebRequest myHttpWebRequest =
(HttpWebRequest)WebRequest.Create(page);
        myHttpWebRequest.Headers.Add("RETS-Version", this.RETSVersion);
        myHttpWebRequest.Accept = "*/*";
        myHttpWebRequest.UserAgent = this.UserAgent;

        myHttpWebRequest.Credentials = loginInfo;
        myHttpWebRequest.CookieContainer = new CookieContainer();
        HttpWebResponse myHttpWebResponse =
(HttpWebResponse)myHttpWebRequest.GetResponse(); // <--- This line throws
WebException in Mono, not .NET
        myHttpWebResponse.Cookies =
myHttpWebRequest.CookieContainer.GetCookies(myHttpWebRequest.RequestUri);

    } // try
    catch (WebException wex)
    {
        success = false;
        WebExceptionReport(wex);
    } // catch
    return success;
} // Login

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list