Re: text/html fallback using the Same Bytes

On 01/07/2011 04:48 AM, Henri Sivonen wrote:
> On Jan 6, 2011, at 18:32, Sam Ruby wrote:
>
>> The contents of my weblog are served as application/xhtml+xml to
>> user agents that support such, and as text/html to everybody else.
>> In the first case, the content is valid XHTML5.  In the latter,
>> valid HTML5. In both cases, the response bodies are byte for byte
>> identical.
>>
>> Despite being byte for byte identical response bodies, the
>> responses are two different things, and result in DOMs with
>> detectable differences.
>
> Is there a reason why Planet Venus and your blog software don't write
> two different byte streams for Apache httpd to choose from? That is,
> when the final bytes don't come from a text editor but come from some
> kind of automated processing pipeline anyway, why don't you make the
> pipeline write one serialization for application/xhtml+xml and
> another for text/html? As far as HTTP intermediaries are concerned,
> your identical byte streams are different responses anyway.
>
> Considering how confusing and brittle polyglot is, even if you can
> perform the stunt of serving one byte stream as both
> application/xhtml+xml and text/html, is it worth encouraging (by your
> example and by the Polyglot publication of the HTML WG) the kids at
> home to try the stunt and shoot themselves in the foot?

You are using extremely loaded words.

First, Venus can and does produce multiple outputs.  I even provide an 
xhtml2html[1] filter do to exactly what you describe.  You can see the 
results for yourself[2].

Second, despite your dire claims of confusion, brittleness, stunts, and 
shooting; (1) many, many people have made use of Planet Venus over an 
extended period of time; (2) as far as I know nobody actually uses the 
filter I provided; (3) problems have been extremely rare and isolated. 
In fact, at the moment I can only recall one problem[3] that affected 
one individual in the past several years.

- Sam Ruby

[1] http://intertwingly.net/code/venus/filters/xhtml2html.plugin
[2] http://planet.intertwingly.net/index.html5
[3] 
https://github.com/rubys/venus/commit/5cefb0fdebbe74ced16449818bad69433b55c378

Received on Friday, 7 January 2011 12:14:31 UTC