Normally if you try to access protect folder by Basic Authentication without proper credentials you will get 401 Unauthorized error:
Example:
curl -s https://yourwebserver.com/mysecure
<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn’t understand how to supply
the credentials required.</p>
</body></html>
You need to specify your username and password to get this passed:
Example:
curl --user admin:yoursecurepassword -s https://yourwebserver.com/mysecure
Enjoy!
я сьогодні переглядав в Інтернеті більше 4 годин, але жодної цікавої статті, подібної до вашої, я так і не знайшов.
А це досить цінно для мене. На мій погляд, якщо всі власники сайтів та
блогери будуть створювати хороший контент, як і
ви, інтернет буде набагато кориснішою, ніж будь-коли раніше.
Тому я не зміг утриматись від коментарю.
Дуже добре написано!