• [^] # Re: Rapport entre if-modified-since et la synchro d'horloge ?

    Posté par . En réponse au message champ If-Modified-Since. Évalué à 2.

    et je me suis trompé, le champs à recopier dans if-modified-since c'est pas Date mais 'Last-Modified'...

    Sinon exemple avec wget:
    qan@trantor2:~$ wget http://www.allcolor.org/YaHPConverter/ -S
    --2009年03月27日 14:22:21-- http://www.allcolor.org/YaHPConverter/
    Résolution de www.allcolor.org... 213.251.169.164
    Connexion vers www.allcolor.org|213.251.169.164|:80... connecté.
    requête HTTP transmise, en attente de la réponse...
    HTTP/1.1 200 OK
    Date: 2009年3月27日 12:20:35 GMT
    Server: Apache/2.0.55 (Ubuntu)
    Last-Modified: 2009年3月21日 12:07:40 GMT
    ETag: "fb8008-73a8-e13e3b00"
    Accept-Ranges: bytes
    Content-Length: 29608
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=UTF-8
    Longueur: 29608 (29K) [text/html]
    Saving to: `index.html'

    100%[======================================>] 29608 --.-K/s in 0,09s

    2009年03月27日 14:22:22 (323 KB/s) - « index.html » sauvegardé [29608/29608]

    qan@trantor2:~$ wget http://www.allcolor.org/YaHPConverter/ -S --header='If-Modified-Since: 2009年3月21日 12:07:40 GMT'
    --2009年03月27日 14:22:40-- http://www.allcolor.org/YaHPConverter/
    Résolution de www.allcolor.org... 213.251.169.164
    Connexion vers www.allcolor.org|213.251.169.164|:80... connecté.
    requête HTTP transmise, en attente de la réponse...
    HTTP/1.1 304 Not Modified
    Date: 2009年3月27日 12:20:53 GMT
    Server: Apache/2.0.55 (Ubuntu)
    Connection: Keep-Alive
    Keep-Alive: timeout=15, max=100
    ETag: "fb8008-73a8-e13e3b00"
    2009年03月27日 14:22:40 ERREUR 304: Not Modified.

    qan@trantor2:~$


    Tu peux aussi faire pareil avec les Etags 'If-None-Match', exemple:

    qan@trantor2:~$ wget http://www.allcolor.org/YaHPConverter/ -S --header='If-None-Match: "fb8008-73a8-e13e3b00"'
    --2009年03月27日 14:24:27-- http://www.allcolor.org/YaHPConverter/
    Résolution de www.allcolor.org... 213.251.169.164
    Connexion vers www.allcolor.org|213.251.169.164|:80... connecté.
    requête HTTP transmise, en attente de la réponse...
    HTTP/1.1 304 Not Modified
    Date: 2009年3月27日 12:22:41 GMT
    Server: Apache/2.0.55 (Ubuntu)
    Connection: Keep-Alive
    Keep-Alive: timeout=15, max=100
    ETag: "fb8008-73a8-e13e3b00"
    2009年03月27日 14:24:27 ERREUR 304: Not Modified.


    Bien à toi, et bonne chance.