tedster - 3:30 am on Jul 6, 2011 (gmt 0)
That earlier post is about how the html for the canonical link element needs to vary by doctype - but the canonical URL itself is not affected by your doctype, only the mark-up.
The http header is the information that your server exchanges with the browser or other user-agent BEFORE it actually sends the document. So it's a server configuration and not something you place within any of your web documents. Depending on your hosting situation, you may not have the ability to address the http headers directly.
You can read up on http header information at the W3C website: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html [w3.org]
And the specific link header that Google is now supporting is explained on the IETF website: http://tools.ietf.org/html/rfc5988#section-5 [tools.ietf.org]