Eu posso acessar a página de configuração do meu dispositivo sem problemas através do navegador da web (na GUI).
Mas parece que não funciona usando cURL:
luis@Fresoncio:~$ curl http://192.168.1.232
<html><head>
<script src="jsMain.js"> </script>
<title>DWL-2100AP</title></head>
<script language='JavaScript'>
document.cookie = 'RpWebID=57562c4e';
</script>
<script language='JavaScript'>
function JumpToHmain(){location.replace('/html/HomeWizard.html');}window.setTimeout('JumpToHmain()',1);</script>
Mesmos resultados aceitando cookies:
luis@Fresoncio:~$ curl http://192.168.1.232 -c cookie.txt
<html><head>
<script src="jsMain.js"> </script>
<title>DWL-2100AP</title></head>
<script language='JavaScript'>
document.cookie = 'RpWebID=57562c5c';
</script>
<script language='JavaScript'>
function JumpToHmain(){location.replace('/html/HomeWizard.html');}window.setTimeout('JumpToHmain()',1);</script>
Mas se eu tentar acessar a página inicial de configuração /html/HomeWizard.html
(desta vez eu tento enviar nome de usuário e senha, desde que eu suponha que será necessário):
luis@Fresoncio:~$ curl -i -H 'Accept:application/json' -H 'Authorization:Basic admin:MyEditedPassword' http://192.168.1.232/html/HomeWizard.html
HTTP/1.1 404 Not Found
Content-Type: text/html
Transfer-Encoding: chunked
Server: Allegro-Software-RomPager/4.06
Connection: close
<html>
<head>
<title>Object Not Found</title></head><body>
<h1>Object Not Found</h1>The requested URL '/html/HomeWizard.html' was not found on the RomPager server.<p>Return to <A HREF="">last page</A><p>
Teste sem a parte Accept/application/json
:
luis@Fresoncio:~$ curl -i -H 'Authorization:Basic admin:MyEditedPassword' http://192.168.1.232/html/HomeWizard.html
HTTP/1.1 404 Not Found
Content-Type: text/html
Transfer-Encoding: chunked
Server: Allegro-Software-RomPager/4.06
Connection: close
<html>
<head>
<title>Object Not Found</title></head><body>
<h1>Object Not Found</h1>The requested URL '/html/HomeWizard.html' was not found on the RomPager server.<p>Return to <A HREF="">last page</A><p>
</body></html>
Não há nenhum problema em acessar a GUI navegando para http://192.168.1.232/html/HomeWizard.html
via Firefox (depois de inserir as credenciais, é claro).
O que está acontecendo aqui e como posso resolvê-lo?
Mais dados:
Tags networking curl http