Re: [Cppcms-users] out() << timezone & redirecting
Brought to you by:
artyom-beilis
From: Pavel K. <un...@fu...> - 2011-03-24 16:40:40
|
ok, it seems that if i want to use it in "automatic way" i need to move it to overloaded render method and in other cases call it manually. i overlook that possibility. it's ellegant too. thanks On Thursday 24 March 2011, Artyom wrote: > The problem is once you request output stream the headers are written and > thus you can't set redirect headers. > > You need to provide headers first (set redirect header or so) > > and then request output stream > > Requesting output stream triggers many things including > headers write and saving session values. > > So instead of > > Use > > > response().set_redirect_header( ... ) > response().out() << booster::locale::as::time_zone( tz ); |