Dne 20.10.2014 12:26, Yuri D'Elia napsal(a):
On 10/20/2014 12:01 PM, "Jan B. Kolář" wrote:
so I checked source code by myself and find solution for my problem with
Nginx + rest.php (see previous emails).
I don't know why, but Nginx need one more header in 401 response. So I
edited "include/fatal.php" file and added one line (bold):
*header('WWW-Authenticate: Basic realm="My Realm"');*
header("HTTP/1.0 401 Unauthorized");
Without this header, Nginx is not asking for credentials on "rest.php"
file, so it was not possible to use dl with Thunderbird.
This doesn't cause any harm, but shouldn't be required at all.
Yes, you are right - it shouldn't be required. I get idea to add this
header from this page - http://php.net/manual/en/features.http-auth.php.
I wasn't ably to find much information about HTTP auth with PHP and
Nginx, so I was just trying. I'm sorry, I don't have time to study this
in more depth. It's just "dirty" solution for my problem - maybe it will
be helpful for others.
Thank you for your work on this project!