• [^] # Re: Explications

    Posté par . En réponse au journal Accès bloqué à un site pour cause Linux ?. Évalué à 5.

    $ telnet 193.121.103.67 80
    Trying 193.121.103.67...
    Connected to www.imes.be (193.121.103.67).
    Escape character is '^]'.
    GET http://193.121.103.67/aernoudt HTTP/1.1
    Host: totoplopplop

    HTTP/1.1 301 Moved Permanently
    Location: http://totoplopplophttp://19/

    $ telnet 193.121.103.67 80
    Trying 193.121.103.67...
    Connected to www.imes.be (193.121.103.67).
    Escape character is '^]'.
    GET /aernoudt HTTP/1.0
    Host: totoplopplop

    HTTP/1.1 301 Moved Permanently
    Location: http://totoplopplop/aernoudt/

    Connection closed by foreign host.

    $ telnet 193.121.103.67 80
    Trying 193.121.103.67...
    Connected to www.imes.be (193.121.103.67).
    Escape character is '^]'.
    GET /aernoudt HTTP/1.0
    Host:

    HTTP/1.1 301 Moved Permanently
    Location: http:///aernoudt/

    Connection closed by foreign host.
    [pterjan@plop migration-wizard]$ telnet 193.121.103.67 80
    Trying 193.121.103.67...
    Connected to www.imes.be (193.121.103.67).
    Escape character is '^]'.
    GET /aernoudt HTTP/1.0

    HTTP/1.1 301 Moved Permanently
    Location: http://MG2/aernoudt/

    Connection closed by foreign host.


    Si on met pas de Host il met le hostname à la place (MG2) jusque là, normal, c'est juste le serveur qui est mal configuré et n'a pas un fqdn.

    Si on met une URL par contre il a un gros bug : au lieu d'un chemin absolu il prend le début de l'URL comme chemin...
    Il prend la longueur de /aernoudt caractères au début de http://193.121.103.67/aernoudt ce qui donne http://19

    Donc le seul cas ou ça marche c'est :
    $ telnet 193.121.103.67 80
    Trying 193.121.103.67...
    Connected to www.imes.be (193.121.103.67).
    Escape character is '^]'.
    GET /aernoudt HTTP/1.0
    Host: 193.121.103.67

    HTTP/1.1 301 Moved Permanently
    Location: http://193.121.103.67/aernoudt/

    Connection closed by foreign host.