Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

halt() not sending expected results when using HTTP_UNAUTHORIZED

#20

I'm currently building a simple JSON API with Limonade, and I need authentication. I've setup Digest Authentication in PHP using the recommended code from the PHP manual: http://us.php.net/features.http-auth

However, my use of halt(HTTP_UNAUTHORIZED, 'Wrong Credentials!'); doesn't work and I get a 200 OK response with the text, "default_layout.php"

My expected result was a 401 Unauthroized header and my message text as the body.

I've done some digging, and I believe that halt is due for some refactoring (per the TODO in that function), so perhaps that's where things are breaking.

Thanks in advance for the bug fix. If I find a solution, I'll post the patch.

Limonade is off to a great start! Thanks.

Reported by TheIdeaMan · July 30th, 2009 @ 09:50 PM

State: resolved
Assigned to: Fabrice Luraine Fabrice Luraine

Activity

  1. Fabrice Luraine
    Fabrice Luraine
    • Milestone set to Release 0.4 - Fresh Mint And Ginger

    This is probably the same bug as described in ticket #18 Bug setting an error_layout()

    I'll fix it as soon as possible.

    Thanks.

    July 31st, 2009 @ 09:00 AM

  2. Fabrice Luraine
    Fabrice Luraine

    Hello,

    i've relaesed the 0.4.1 version of Limonade. It fixes many bugs, included the #18 Bug setting an error_layout(). Can you tell me if it resolves your problem ?

    Thks.

    August 2nd, 2009 @ 01:20 PM

  3. Fabrice Luraine
    Fabrice Luraine
    • State changed from new to resolved

    September 19th, 2009 @ 04:58 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.