Fwd: [PHP] HTTP Authenticaion Query

From: Date: Mon, 21 Feb 2011 07:34:24 +0000
Subject: Fwd: [PHP] HTTP Authenticaion Query
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-311488@lists.php.net to get a copy of this message
---------- Forwarded message ---------- From: Ashim Kapoor <ashimkapoor@gmail.com> Date: Mon, Feb 21, 2011 at 12:46 PM Subject: Re: [PHP] HTTP Authenticaion Query To: Peter Lind <peter.e.lind@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

« previous php.general (#311488) next »