Last-Modified headers on national rail knowledge base feeds

68 views
Skip to first unread message

Ceri Storey

unread,
Jun 3, 2017, 7:11:47 AM6/3/17
to A gathering place for the Open Rail Data community
Hi,

The knowledge base feeds (as described at http://www.nationalrail.co.uk/100298.aspx or http://nrodwiki.rockshore.net/index.php/KnowledgeBase) are advertised as publishing a Last-Modified: header field, to allow efficient polling; but unfortunately, I can't see that this is the case. As an example with curl:

: cez@Ceri-no-Mac-mini; curl -vs -H X-Auth-Token:my-token-goes-here https://datafeeds.nationalrail.co.uk/api/staticfeeds/4.0/serviceIndicators > /dev/null
*   Trying 54.77.164.226...
* Connected to datafeeds.nationalrail.co.uk (54.77.164.226) port 443 (#0)
* TLS 1.0 connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate: datafeeds.nationalrail.co.uk
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> GET /api/staticfeeds/4.0/serviceIndicators HTTP/1.1
> User-Agent: curl/7.43.0
> Accept: */*
> X-Auth-Token:my-token-goes-here
>
< HTTP/1.1 200 OK
< Date: Sat, 03 Jun 2017 11:07:59 GMT
< Server: Apache-Coyote/1.1
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: 0
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< Content-Type: text/plain;charset=ISO-8859-1
< Content-Length: 9960
< Connection: close
<
{ [7668 bytes data]
* Closing connection 0
: cez@Ceri-no-Mac-mini;

I'm expecting to see a "Last-Modified:" header in the response, that I can use in concert with the "If-Modified-Since" request header to avoid re-fetching the data if it's not changed.

Cheers,

Omar Gulam

unread,
Jun 7, 2017, 10:14:02 AM6/7/17
to A gathering place for the Open Rail Data community
Hi,

Apologies, this is an error, the "Last-Modified" field does not get published. The wiki page has now been updated to reflect this.

Thanks

Regards,

Omar
Reply all
Reply to author
Forward
0 new messages