[HTTP] Authentification htaccess
Bonjour,
Je cherche à récupérer le contenu d'un fichier qui est protégé par une authentification htaccess basic.
J'ai réussi à trouver un bride de requête HTTP :
Code:
1 2
| GET http://domain.com/fichier.txt HTTP/1.0
Authorization: Basic bG9naW46cGFzcwo= |
bG9naW46cGFzcwo= correspondant au couple login:password uuencodé.
Mais je reçois en réponse un accès refusé :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| <!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>
</body></html> |
Je développe en C à la de la bibliothèque gnet.
Je suis nul en ce qui concerne les réseaux donc je me tourne vers vous pour savoir si je suis parti dans la bonne voie et pourquoi ça ne fonctionne pas ?
:merci: