You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Merico Raffaele <ra...@less.ch> on 2004/12/08 09:17:54 UTC
newlines to
Dear Community
I'm looking for a way to translate the newlines in a text into HTML-<BR>
when serializing to HTML.
Can anybody give me a tip. I'm using cocoon.2.1.6 and saxonb.8.1.1.
Many thanks in advance ... Raffaele
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Replacing HTTP-header value
Posted by Jorg Heymans <jh...@domek.be>.
Adam Ratcliffe wrote:
> Hi Jorg
>
> Setting the 'Vary' response header implicitly when the 'expires' parameter
> is not provided
> is not IMO correct behaviour.
>
> I submitted a patch for this:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=33319
> which was applied in February.
>
Cool :) So Ilya just upgrade to the latest and greatest 2.1.7 and your
prob should be sorted.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Replacing HTTP-header value
Posted by Adam Ratcliffe <ad...@prema.co.nz>.
Hi Jorg
Setting the 'Vary' response header implicitly when the 'expires' parameter
is not provided
is not IMO correct behaviour.
I submitted a patch for this:
http://issues.apache.org/bugzilla/show_bug.cgi?id=33319
which was applied in February.
HTH
Adam
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of Jorg Heymans
> Sent: Thursday, 24 March 2005 3:11 a.m.
> To: users@cocoon.apache.org
> Subject: Re: Replacing HTTP-header value
>
>
> I found what's causing your problem.
>
> In resolution to bug 14048 [1], the ResourceReader was changed to append
> a Vary=Host responseheader if the reader was configured without
> expiration time. So try setting an expires parameter on your
> resourcereader and see if it helps.
>
> As to whether cocoon's behaviour is correct in this case i do not know.
>
> Regards
> Jorg
>
> [1] http://issues.eu.apache.org/bugzilla/show_bug.cgi?id=14048
>
> Ilya Vyatkin wrote:
> > sorry, I was mistaken -
> >
> >>so if you set Vary to asd, cocoon sends Hostasd ?
> >
> > In this case it sends:
> > Vary: asd,Host
> >
> > Ilya
> >
> >
> >>What version of cocoon are you using? I can't see from the
> >>action itself how it could be appending your header :
> >>
> >> for (int i = 0; i < names.length; i++) {
> >>
> >>response.setHeader(names[i],parameters.getParameter(names[i]));
> >> results.put(names[i], parameters.getParameter(names[i]));
> >> }
> >>
> >>so if you set Vary to asd, cocoon sends Hostasd ?
> >>
> >>
> >>
> >>>How can I remove http response header "Vary" or replace its value?
> >>>Cocoon sets it as "Vary: Host" what leads to local caching
> >>
> >>problems in
> >>
> >>>IE :(
> >>>
> >>>I've tried using org.apache.cocoon.acting.HttpHeaderAction
> >>
> >>with parameter:
> >>
> >>><map:parameter name="Vary" value="myValue" /> But it appends value
> >>>instead replacing.
> >>>
> >>>Here is my example:
> >>><map:match pattern="**.jpg">
> >>> <map:act type="set-header">
> >>> <map:parameter name="Vary" value="asd" />
> >>> </map:act>
> >>> <map:read mime-type="images/jpg" src="{1}.jpg"/> </map:match>
> >>>
> >>>
> >>>ilya
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Replacing HTTP-header value
Posted by Jorg Heymans <jh...@domek.be>.
I found what's causing your problem.
In resolution to bug 14048 [1], the ResourceReader was changed to append
a Vary=Host responseheader if the reader was configured without
expiration time. So try setting an expires parameter on your
resourcereader and see if it helps.
As to whether cocoon's behaviour is correct in this case i do not know.
Regards
Jorg
[1] http://issues.eu.apache.org/bugzilla/show_bug.cgi?id=14048
Ilya Vyatkin wrote:
> sorry, I was mistaken -
>
>>so if you set Vary to asd, cocoon sends Hostasd ?
>
> In this case it sends:
> Vary: asd,Host
>
> Ilya
>
>
>>What version of cocoon are you using? I can't see from the
>>action itself how it could be appending your header :
>>
>> for (int i = 0; i < names.length; i++) {
>>
>>response.setHeader(names[i],parameters.getParameter(names[i]));
>> results.put(names[i], parameters.getParameter(names[i]));
>> }
>>
>>so if you set Vary to asd, cocoon sends Hostasd ?
>>
>>
>>
>>>How can I remove http response header "Vary" or replace its value?
>>>Cocoon sets it as "Vary: Host" what leads to local caching
>>
>>problems in
>>
>>>IE :(
>>>
>>>I've tried using org.apache.cocoon.acting.HttpHeaderAction
>>
>>with parameter:
>>
>>><map:parameter name="Vary" value="myValue" /> But it appends value
>>>instead replacing.
>>>
>>>Here is my example:
>>><map:match pattern="**.jpg">
>>> <map:act type="set-header">
>>> <map:parameter name="Vary" value="asd" />
>>> </map:act>
>>> <map:read mime-type="images/jpg" src="{1}.jpg"/> </map:match>
>>>
>>>
>>>ilya
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Replacing HTTP-header value
Posted by Ilya Vyatkin <la...@sigent.ru>.
sorry, I was mistaken -
> so if you set Vary to asd, cocoon sends Hostasd ?
In this case it sends:
Vary: asd,Host
Ilya
> What version of cocoon are you using? I can't see from the
> action itself how it could be appending your header :
>
> for (int i = 0; i < names.length; i++) {
>
> response.setHeader(names[i],parameters.getParameter(names[i]));
> results.put(names[i], parameters.getParameter(names[i]));
> }
>
> so if you set Vary to asd, cocoon sends Hostasd ?
>
>
> > How can I remove http response header "Vary" or replace its value?
> > Cocoon sets it as "Vary: Host" what leads to local caching
> problems in
> > IE :(
> >
> > I've tried using org.apache.cocoon.acting.HttpHeaderAction
> with parameter:
> > <map:parameter name="Vary" value="myValue" /> But it appends value
> > instead replacing.
> >
> > Here is my example:
> > <map:match pattern="**.jpg">
> > <map:act type="set-header">
> > <map:parameter name="Vary" value="asd" />
> > </map:act>
> > <map:read mime-type="images/jpg" src="{1}.jpg"/> </map:match>
> >
> >
> > ilya
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Replacing HTTP-header value
Posted by Jorg Heymans <jh...@domek.be>.
What version of cocoon are you using? I can't see from the action itself
how it could be appending your header :
for (int i = 0; i < names.length; i++) {
response.setHeader(names[i],parameters.getParameter(names[i]));
results.put(names[i], parameters.getParameter(names[i]));
}
so if you set Vary to asd, cocoon sends Hostasd ?
Ilya Vyatkin wrote:
> hi!
>
>
> How can I remove http response header "Vary" or replace its value?
> Cocoon sets it as "Vary: Host" what leads to local caching problems in IE :(
>
> I've tried using org.apache.cocoon.acting.HttpHeaderAction with parameter:
> <map:parameter name="Vary" value="myValue" />
> But it appends value instead replacing.
>
> Here is my example:
> <map:match pattern="**.jpg">
> <map:act type="set-header">
> <map:parameter name="Vary" value="asd" />
> </map:act>
> <map:read mime-type="images/jpg" src="{1}.jpg"/>
> </map:match>
>
>
> ilya
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Replacing HTTP-header value
Posted by Ilya Vyatkin <la...@sigent.ru>.
hi!
How can I remove http response header "Vary" or replace its value?
Cocoon sets it as "Vary: Host" what leads to local caching problems in IE :(
I've tried using org.apache.cocoon.acting.HttpHeaderAction with parameter:
<map:parameter name="Vary" value="myValue" />
But it appends value instead replacing.
Here is my example:
<map:match pattern="**.jpg">
<map:act type="set-header">
<map:parameter name="Vary" value="asd" />
</map:act>
<map:read mime-type="images/jpg" src="{1}.jpg"/>
</map:match>
ilya
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: newlines to
Posted by Johannes Textor <jc...@gmx.de>.
Hi Merico,
I have attached a stylesheet that I use for doing this.
Works for me with xalan, hopefully also with saxon.
HTH, Johannes
Merico Raffaele wrote:
>Dear Community
>
>I'm looking for a way to translate the newlines in a text into HTML-<BR>
>when serializing to HTML.
>Can anybody give me a tip. I'm using cocoon.2.1.6 and saxonb.8.1.1.
>
>Many thanks in advance ... Raffaele
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>