Bug report: Bad Last-Modified HTTP header
-
I’m using a script to fetch this Atom feed:
https://frameshiftconsulting.com/blog/feed/atom/
which is on a site hosted by WordPress.com.
The HTTP headers for this feed have an incorrect value:
Last-Modified: GMT
According to the specification of the Last-Modified header [1] this header value should not be a bare ‘GMT’, it should should be of the form HTTP-Date [2] which would look something like:
Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
[1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29
[2] https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1The blog I need help with is: (visible only to logged in users)
-
Thanks Mary, it looks like WordPress.org core set this format a while back:
https://core.trac.wordpress.org/ticket/983I’m digging around on this side, but if you’re up to it, you can file a patch, too.
-
Thanks, but that WordPress.org bug seems to describe something different: a bug in the dates within the Atom feed itself. The bug I am describing in is an HTTP header: in the server-client communication conversation, not in the contents of the Atom feed.
It’s possible this is set by WordPress software (as PHP can modify HTTP headers) but it’s more likely to be an webserver (eg nginx) configuration error of some kind.
Here’s a bit more detail
$ HEAD https://frameshiftconsulting.com/blog/feed/
200 OK
Connection: close
Date: Mon, 29 Aug 2016 22:30:11 GMT
ETag: “99b889a9cd748e8b4eca0eb3758d138d”
Server: nginx
Vary: Accept-Encoding
Vary: Cookie
Content-Type: application/rss+xml; charset=UTF-8
Last-Modified: GMT
Client-Date: Mon, 29 Aug 2016 22:30:11 GMT
Client-Peer: 192.0.78.24:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Let’s Encrypt/CN=Let’s Encrypt Authority X3
Client-SSL-Cert-Subject: /CN=tls.automattic.com
Client-SSL-Cipher: ECDHE-RSA-AES128-GCM-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Strict-Transport-Security: max-age=86400
X-Ac: 2.syd _bur
X-Hacker: If you’re reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.$ HEAD https://frameshiftconsulting.com/blog/feed/atom/
200 OK
Connection: close
Date: Mon, 29 Aug 2016 22:30:02 GMT
ETag: “99b889a9cd748e8b4eca0eb3758d138d”
Server: nginx
Vary: Accept-Encoding
Vary: Cookie
Content-Type: application/atom+xml; charset=UTF-8
Last-Modified: GMT
Client-Date: Mon, 29 Aug 2016 22:30:02 GMT
Client-Peer: 192.0.78.24:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Let’s Encrypt/CN=Let’s Encrypt Authority X3
Client-SSL-Cert-Subject: /CN=tls.automattic.com
Client-SSL-Cipher: ECDHE-RSA-AES128-GCM-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Strict-Transport-Security: max-age=86400
X-Ac: 2.syd _bur
X-Hacker: If you’re reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header. -
-
For what it’s worth, these return proper Last Modified stamps:
https://frameshiftconsulting.com/tag/classes/feed/atom
https://frameshiftconsulting.com/feed/atom
So I don’t think it’s a server misconfiguration. Still trying to figure out why /blog/feed/atom is off.
-
Hi @Mary, our developers have done a bit of digging on this. It seems two factors go into this bug:
– your posts page <strike>( /blog) is</strike> was not the main page of the site
– your posts don’t have any comments (they are disabled)So we’ve noted that issue and have it on our to do list. But in the meantime, all of your posts will still show here with the proper stamp, so we recommend using this feed instead:
https://frameshiftconsulting.com/feed/atom
- The topic ‘Bug report: Bad Last-Modified HTTP header’ is closed to new replies.