System.Web.HttpException (0x80004005) in Optimizely MediaHandlerBase: Server cannot append header after HTTP headers have been sent.
I ran into this exception while looking at a custom media handler in an Optimizely CMS 11 website. The stack trace pointed at Optimizely trying to append an ETag header, but the interesting part turned out to be…