Re: [Recipes] Puzzle with HTTP Accept, Firefox header plug-in and RDF

Dear group,

I wonder if we could allocate some time today to briefly discuss about  
the next steps to produce a revised Recipes note.

By the way, we just checked the new Internet Explorer 8, and it still  
sends the very same value in the Accept header: */*.

Best,

Diego.

El 26/02/2009, a las 14:34, Antoine Isaac escribió:

> Diego, Sergio
>
> Excellent job! I think this is worth discussing it at the next  
> telecon. If it is not too much hassle from a W3C perspective, I  
> think a new version of the Note should be published. Now that you  
> have fixed the issue, it would be a waste :-)
>
> Best,
>
> Antoine
>
>
>> Antoine, Alistair,
>> Sorry for the belated response. We've been making some tests to  
>> analyse the problem with Recipe 3 in order to trace the issue found  
>> by Antoine. We discovered that it is due to the precedence of the  
>> User Agent check over the Accept header check. In other words, when  
>> the User Agent is Mozilla (or Mozilla-compatible), Recipe 3 --as it  
>> is now-- always returns RDF, regardless of the Accept header.
>> We have found this formula to fix this issue without breaking the  
>> other cases (see my messages from August'08: [1] and [2]):
>> ====
>> RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html| 
>> application/xhtml\+xml)
>> RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
>> RewriteCond %{HTTP_ACCEPT} text/html
>> RewriteRule ^example3$ example3-content/2005-10-31.html [R=303]
>> RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml
>> RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
>> RewriteRule ^example3$ example3-content/2005-10-31.html [R=303]
>> RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
>> RewriteRule ^example3$ example3-content/2005-10-31.rdf [R=303]
>> RewriteRule ^example3$ example3-content/2005-10-31.rdf [R=303]
>> ====
>> If you compare these rules and the ones in the published Note [3],  
>> the difference is that we split the first RewriteRule into two new  
>> ones. The purpose is to serve HTML to Mozilla-compatible user  
>> agents *only* if the do not explicitly ask for RDF. Take into  
>> account that we do not master Apache rewrite rules, consequently  
>> there may be a more optimal solution to the same problem.
>> At the same time, we have introduced a few changes and bugfixes in  
>> Vapour. The most remarkable one is the ability to customize the  
>> value of the User-Agent header sent by Vapour. With this new  
>> feature, you can easily debug which result will be returned to  
>> Mozilla-compatible browsers. For instance, you can test the current  
>> example of Recipe 3 with a non-Mozilla [4] and a Mozilla-compatible  
>> User Agent [5]. These results confirm the issue spotted by Antoine.
>> In our next telecon, we can discuss this issue and whether we  
>> should change the Recipes (3 to 6) and publish a new version of the  
>> Note.
>> Best,
>> Diego and Sergio.
>> [1] http://lists.w3.org/Archives/Public/public-swd-wg/2007Jul/0130.html
>> [2] http://lists.w3.org/Archives/Public/public-swd-wg/2007Aug/0008.html
>> [3] http://www.w3.org/TR/swbp-vocab-pub/#recipe3example
>> [4] http://validator.linkeddata.org/vapour?vocabUri=http%3A%2F%2Fwww.w3.org%2F2006%2F07%2FSWD%2Frecipes%2Fexamples-20080421%2Fexample3&classUri=http%3A%2F%2F&propertyUri=http%3A%2F%2F&instanceUri=http%3A%2F%2F&htmlVersions=1&defaultResponse=dontmind&userAgent=vapour.sourceforge.net 
>>  [5] http://validator.linkeddata.org/vapour?vocabUri=http%3A%2F%2Fwww.w3.org%2F2006%2F07%2FSWD%2Frecipes%2Fexamples-20080421%2Fexample3&classUri=http%3A%2F%2F&propertyUri=http%3A%2F%2F&instanceUri=http%3A%2F%2F&htmlVersions=1&defaultResponse=dontmind&userAgent=Mozilla%2F5.0 
>>  Alistair Miles escribió:

--
Diego Berrueta
R&D Department  -  CTIC Foundation
E-mail: diego.berrueta@fundacionctic.org
Phone: +34 984 29 12 12
Parque Científico Tecnológico Gijón-Asturias-Spain
www.fundacionctic.org

Received on Tuesday, 24 March 2009 09:52:18 UTC