You don’t seem to be doing the same thing: rather, you’re sniffing for an Accept header, and if it includes text/html, you serve HTML, and if it doesn’t, you serve an Atom feed with no XSL stylesheet.
Incidentally, given this behaviour your response should include `Vary: Accept`. This is actually messing Firefox up a bit: open the document, it loads the HTML, View Source, it renders the source of the Atom, loading it from the cache according to the dev tools, not sure how it got there, force reload and you get the source of the HTML. Your server is also not handling HEAD requests, but improperly responding 405 to them.
Incidentally, given this behaviour your response should include `Vary: Accept`. This is actually messing Firefox up a bit: open the document, it loads the HTML, View Source, it renders the source of the Atom, loading it from the cache according to the dev tools, not sure how it got there, force reload and you get the source of the HTML. Your server is also not handling HEAD requests, but improperly responding 405 to them.