You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Grzegorz Kossakowski <g....@interia.pl> on 2006/03/10 12:16:50 UTC

Re[2]: [Documentation] isGlobal == HTTP redirect, right? (was: Verify status of flowscript document please)

Hello Bertrand,

Friday, March 10, 2006, 11:51:33 AM, you wrote:

> Le 10 mars 06 à 11:31, hepabolu a écrit :

> Just wondering about this isGlobal explanation:

> "If the isGlobal argument is true, the redirect will be global, i.e.  
> it returns all the way to the browser, even from within internal  
> requests."

> is not too clear for me, I'd write:

after few moments of exhilaration caused by the fact my first reported bug
was fixed I feel the same, it's not clear

> "The isGlobal argument, if true, causes an HTTP redirect to be sent  
> to the client browser in all cases.

> When isGlobal is false and the current request is an internal one  
> (i.e. uses the cocoon: protocol), the redirect is processed  
> internally within Cocoon, by executing the pipeline specified by the  
> uri argument, without sending an HTTP redirect".

+1 for this with one exception. Not always pipeline is executed even isGlobal is
false. Eg:
<map:aggregate>
  <map:part src="cocoon:/callflow"/>
</map:aggregate>

And in some flow function:
cocoon.redirectTo("http://www.google.com", false);

Aggregator will try to use as a part content read from google. So it's not
neccessarily redirect to another Cocoon pipeline. It just redirect internal
request to whatever you want.

> This is IMHO clearer, but can someone confirm that the described  
> behaviour is correct?

I can confirm if it's enough. I firstly discovered that parameter in javadoc[1],
tried to use with success and then created the issue.

[1] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.html#jsFunction_redirectTo(java.lang.String,%20boolean)

-- 
Best regards,
 Grzegorz                            mailto:g.kossakowski@interia.pl


---------------------------------------------------------------------
Toshiba i FIFA World Cup
Wygraj bilety i notebooki z Intel Centrino Duo Mobile Technology
http://link.interia.pl/f1912


Re: Re[2]: [Documentation] isGlobal == HTTP redirect, right? (was: Verify status of flowscript document please)

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 10 mars 06 à 12:16, Grzegorz Kossakowski a écrit :

> ...So it's not
> neccessarily redirect to another Cocoon pipeline. It just redirect  
> internal
> request to whatever you want...

You're right, thanks for the precision.

-Bertrand

Re: [Documentation] isGlobal == HTTP redirect, right?

Posted by hepabolu <he...@gmail.com>.
Bruno Dumon said the following on 10-03-2006 15:18:
> Thanks for clarifying (I learned something new). I added your
> explanation to the docs:
> http://cocoon.zones.apache.org/daisy/legacydocs/documentation/userdocs/flow/api.html
> 

I had no clue on how this worked so I tried to add something that made 
sense. Thanks for the clarification and the update.

Bye, Helma


Re[4]: [Documentation] isGlobal == HTTP redirect, right? (was: Verify status of flowscript document please)

Posted by Grzegorz Kossakowski <g....@interia.pl>.
Hello Bruno,

Friday, March 10, 2006, 3:18:54 PM, you wrote:

> Thanks for clarifying (I learned something new). I added your
> explanation to the docs:
> http://cocoon.zones.apache.org/daisy/legacydocs/documentation/userdocs/flow/api.html

Great, thank you!

-- 
Best regards,
 Grzegorz                            mailto:g.kossakowski@interia.pl


---------------------------------------------------------------------
Toshiba i FIFA World Cup
Wygraj bilety i notebooki z Intel Centrino Duo Mobile Technology
http://link.interia.pl/f1912


Re: Re[2]: [Documentation] isGlobal == HTTP redirect, right? (was: Verify status of flowscript document please)

Posted by Bruno Dumon <br...@outerthought.org>.
On Fri, 2006-03-10 at 12:16 +0100, Grzegorz Kossakowski wrote:
> Hello Bertrand,
> 
> Friday, March 10, 2006, 11:51:33 AM, you wrote:
> 
> > Le 10 mars 06 à 11:31, hepabolu a écrit :
> 
> > Just wondering about this isGlobal explanation:
> 
> > "If the isGlobal argument is true, the redirect will be global, i.e.  
> > it returns all the way to the browser, even from within internal  
> > requests."
> 
> > is not too clear for me, I'd write:
> 
> after few moments of exhilaration caused by the fact my first reported bug
> was fixed I feel the same, it's not clear
> 
> > "The isGlobal argument, if true, causes an HTTP redirect to be sent  
> > to the client browser in all cases.
> 
> > When isGlobal is false and the current request is an internal one  
> > (i.e. uses the cocoon: protocol), the redirect is processed  
> > internally within Cocoon, by executing the pipeline specified by the  
> > uri argument, without sending an HTTP redirect".
> 
> +1 for this with one exception. Not always pipeline is executed even isGlobal is
> false. Eg:
> <map:aggregate>
>   <map:part src="cocoon:/callflow"/>
> </map:aggregate>
> 
> And in some flow function:
> cocoon.redirectTo("http://www.google.com", false);
> 
> Aggregator will try to use as a part content read from google. So it's not
> neccessarily redirect to another Cocoon pipeline. It just redirect internal
> request to whatever you want.

Thanks for clarifying (I learned something new). I added your
explanation to the docs:
http://cocoon.zones.apache.org/daisy/legacydocs/documentation/userdocs/flow/api.html

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org