---------- Forwarded message ----------
From: Ashim Kapoor <ashimkap...@gmail.com>
Date: Mon, Feb 21, 2011 at 12:46 PM
Subject: Re: [PHP] HTTP Authenticaion Query
To: Peter Lind <peter.e.l...@gmail.com>



You are tired and not thinking straight. HTTP is a stateless thing: 1.
> you request the page, but you're not authorized, hence you hit the
> first part of the if. PHP does not wait for you to do anything, it
> just runs through the script and sends back a page to you. 2. You
> enter your auth details, once again requesting the same page. 3. PHP
> now sees the auth header sent by your browser, hence hits the second
> part of the if.
>
> Suppose I press Cancel, I would enter the 1st part of the if ,why is the
header not sent again ?
Also how long will this authentication last? I tried closing my browser and
reloading the script and it still shows it as authorized.

Many thanks,
Ashim

Reply via email to