Vous pouvez utiliser n'importe quel outil permettant d'obtenir des en-têtes HTTP. Exemple avec curl, vous devriez voir le serveur répondre avec WWW-Authenticate: Basic realm="xxx"
s'il utilise l'authentification de base.
Si on le digère, il ressemblera à ce qui suit.
WWW-Authenticate: Digest realm="testrealm@host.com",
qop="auth,auth-int",
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
opaque="5ccc069c403ebaf9f0171e9517f40e41"
Voici comment voir les en-têtes dans curl.
$ curl -v http://a.b.c.d/
* About to connect() to a.b.c.d port 80 (#0)
* Trying a.b.c.d...
* Adding handle: conn: 0x7f8e0a008c00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7f8e0a008c00) send_pipe: 1, recv_pipe: 0
* Connected to a.b.c.d (a.b.c.d) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.30.0
> Host: a.b.c.d
> Accept: */*
>
< HTTP/1.1 401 Authorization Required
< Date: Wed, 05 Nov 2014 07:27:40 GMT
* Server Apache is not blacklisted
< Server: Apache
< WWW-Authenticate: Basic realm="xxx"
< Content-Length: 463
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</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>
<hr>
<address>Apache Server at a.b.c.d Port 80</address>
</body></html>