Re: Setting HTTP protocol header LINK using header action

Bardo Nelgen <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Organization BNN Performances
Message-ID <[email protected]>

O.k., got it. You simply need to get away from the spec a bit in order 
to succeed:

For browser-compatibility's sake instead of writing

> <map:parameter name="Link" value=" &#60;/images/MyIcon.gif&#62;; 
> rel='shortcut' " />

you better skip the inner quotes and go with

> <map:parameter name="Link" value=" &#60;/images/MyIcon.gif&#62;; 
> rel=shortcut " />



or for stylesheets, instead of

<map:parameter name="Link" value=" &#60;/styles/default.css&#62;; 
rel='stylesheet'; media='screen, handheld'; type='text/css' " />

better try with

<map:parameter name="Link" value=" &#60;/styles/default.css&#62;; 
rel=stylesheet; media=screen&#44;handheld; type=text/css " />

instead.



Just in case someone else runs into this.



Am 13.12.2012 22:52, schrieb Bardo Nelgen:
>
> Hi all,
>
> has anyone so far been successful setting a HTTP protocol LINK parameter
>
> (according to http://tools.ietf.org/html/rfc5988#section-5.5 )
>
> using the cocoon header action? Unfortunately the newer response 
> header transformer doesn't seem to live up to its promises quite yet, 
> so I'm currently trying with the action.
>
> By now, I've been successful using the following dummy data
>
>> <map:act type="header">
>> <map:parameter name="content-language" 
>> value="{flow-attribute:locale}" />
>> <map:parameter name="author" value="BNN" />
>> <map:parameter name="revised" value="Bardo Nelgen, 2012-09-11" />
>> <map:parameter name="X-content-age" value="16" />
>> <map:parameter name="dc.title" value="{flow-attribute:mtit}" />
>> <map:parameter name="Description" value="{flow-attribute:mdesc}" />
>> <map:parameter name="Keywords" value="{flow-attribute:keys}" />
>> <map:parameter name="geo.position" value="49.975712,8.11796" />
>> <map:parameter name="ICBM" value="49.975712,8.11796" />
>> </map:act>
>
> with all parameters absolutely correctly ending up in the HTTP 
> response header for the particular request.
>
>
> Though, as soon as trying with the Link parameter, webbrowsers do not 
> appear to recognize the result correctly from the resulting output: It 
> makes it right into the header, though obviously in the wrong format, 
> leaving me with
>
>> Link </images/semawine/RheinhessenWein.gif>; rel='shortcut',
>> </images/semawine/RheinhessenWein.gif>; rel='icon',
>> <http://www.semaworx.org/cocoon/semaworx/.html>; rel='bookmark',
>> <http://www.semaworx.org/cocoon/semaworx/.html>; rel='canonical',
>> <#top>; rel='start'; title*=UTF-8'de'zum%20Seitenanfang
>
>
>
> Maybe I'm getting something wrong with the syntax at this point…
>
>> <map:parameter name="Link" value=" 
>> &#60;/images/semawine/RheinhessenWein.gif&#62;; rel='shortcut',
>> &#60;/images/semawine/RheinhessenWein.gif&#62;; rel='icon',
>> &#60;http://www.semaworx.org/cocoon/semaworx/{1}.html&#62;; 
>> rel='bookmark',
>> &#60;http://www.semaworx.org/cocoon/semaworx/{1}.html&#62;; 
>> rel='canonical',
>> &#60;#top&#62;; rel='start'; title*=UTF-8'de'zum%20Seitenanfang " />
>
> Any ideas or guesses on how to get this right are highly appreciated!!
>
> Best,
>
> Bardo
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.