Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#430 NullPointerException on WWW-Authenticate with no realm entry

Wolfgang Fahl
Bill Medland

If the server responds with a WWW-Authenticate header that does not contain a realm property then WebClient.getCredentialsForRealm throws a NullPointerException whereas I would expect it to return a null PasswordAuthentication reference


  • Wolfgang Fahl
    Wolfgang Fahl


    this can certainly easily be fixed. Please supply a JUnit Test case and I'll fix the code.


  • Wolfgang Fahl
    Wolfgang Fahl

    Dear httpunit user!

    Thank you for your bug report. We appreciate the time and effort you are putting into this.

    Please supply a testcase with the expected result for the bug report that you are asking a solution for and we'll look into implementing it. For a start you might want to get the trunk version from the subversion repository (see\)
    and have a look at the source code of some of the more than 700 JUnit based testcase in there.

    If you do not use or have subversion tool you can still directly browse our test cases via:
    Looking into one or more of the Junit Java source files
    should give you a clue on what a proper testcase for httpunit looks like, often you will probably only have to "clone" an existing testcase and modify it slightly to your needs.

    When you are ready you might want to attach the testcase (and if you already have started implementing a solution for it it also the actual code) to the patch section of the tracker for patches of the httpunit project at

    The main communication about further details of the development is via the httpunit developer mailinglist. You are most welcome to sign up via

    The httpunit developer team

    (Russell, Wolfgang, Mark, Patrick and Tim as of 2008-04)

  • Wolfgang Fahl
    Wolfgang Fahl

    • priority: 5 --> 7
    • assigned_to: nobody --> wolfgang_fahl
    • status: open --> pending-rejected
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

    • status: pending-rejected --> closed-rejected