Skip to content

Instantly share code, notes, and snippets.

@benubois
Last active December 20, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benubois/6122707 to your computer and use it in GitHub Desktop.
Save benubois/6122707 to your computer and use it in GitHub Desktop.

Original request says the Last-Modified date is Mon, 11 Nov 2013 14:16:00 GMT which is in the future so it is probably misconfigured.

curl -v http://www.pvponline.com/feed
* About to connect() to www.pvponline.com port 80 (#0)
*   Trying 54.245.239.139...
* connected
* Connected to www.pvponline.com (54.245.239.139) port 80 (#0)
> GET /feed HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
> Host: www.pvponline.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Cache-Control: max-age=3600, public
< Content-Type: text/xml; charset=utf-8
< Date: Wed, 31 Jul 2013 14:53:29 GMT
< Expires: Mon, 11 Nov 2013 15:16:00 GMT
< Last-Modified: Mon, 11 Nov 2013 14:16:00 GMT
< Pragma: no-cache
< Server: Apache
< Set-Cookie: pvpsite_last_visit=1059922409; expires=Thu, 31-Jul-2014 14:53:29 GMT; path=/
< Set-Cookie: pvpsite_last_activity=1375282409; expires=Thu, 31-Jul-2014 14:53:29 GMT; path=/
< Set-Cookie: pvpsite_tracker=a%3A1%3A%7Bi%3A0%3Bs%3A4%3A%22feed%22%3B%7D; path=/
< Vary: Accept-Encoding
< Content-Length: 5453
< Connection: keep-alive

Using the Last-Modified date for subsequent requests fails because the Last-Modified header never changes.

Request with If-Modified-Since returns a 304 Not Modified

curl -v --header 'If-Modified-Since:Mon, 11 Nov 2013 14:16:00 GMT' http://www.pvponline.com/feed
* About to connect() to www.pvponline.com port 80 (#0)
*   Trying 54.245.239.139...
* connected
* Connected to www.pvponline.com (54.245.239.139) port 80 (#0)
> GET /feed HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
> Host: www.pvponline.com
> Accept: */*
> If-Modified-Since:Mon, 11 Nov 2013 14:16:00 GMT
> 
< HTTP/1.1 304 Not Modified
< Cache-Control: max-age=3600, public
< Date: Wed, 31 Jul 2013 14:54:13 GMT
< Expires: Thu, 01 Aug 2013 14:54:13 GMT
< Server: Apache
< Set-Cookie: pvpsite_last_visit=1059922454; expires=Thu, 31-Jul-2014 14:54:14 GMT; path=/
< Set-Cookie: pvpsite_last_activity=1375282454; expires=Thu, 31-Jul-2014 14:54:14 GMT; path=/
< Set-Cookie: pvpsite_tracker=a%3A1%3A%7Bi%3A0%3Bs%3A4%3A%22feed%22%3B%7D; path=/
< Connection: keep-alive
< 
* Connection #0 to host www.pvponline.com left intact
* Closing connection #0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment