
geoff at modperlcookbook
Apr 7, 2006, 8:38 AM
Post #4 of 5
(2981 views)
Permalink
|
>>> it is suggested that the proper syntax for adding a header is: >>> >>> $r->headers_out->add('Set-Cookie' => $cookie); >>> >>> This howerver does not work. >> >> >> of course it does. you can see from yourself in the mod_perl test suite: >> >> t/response/TestAPI/err_headers_out.pm [21]: >> $r->err_headers_out->add('X-err_headers_out' => "err_headers_out");> > > > All of your responses have been about $r->err_headers_out, all? > my trouble > was with $r->headers_out() which really, honestly didn't work. it's the same underlying mechanism - headers_out(), err_headers_out(), headers_in(), and notes() all use the APR::Table API, so if one works the others will as well, since they are indistinguishable at the API layer. but you can check that same file for where it uses headers_out()->add() as well. > However, > as stated earlier in the thread that was a bug that's apparently been > fixed. there have been no fixes to that code in quite some time, nor can I find some other thread where this is being discussed currently. but I'm glad to hear that your problem has been magically fixed :) > >>> $r->headers_out->{'Pragma'} = "no-cache"; >> >> >> this documentation is for the compat layer. I can't recall offhand >> whether >> this syntax works without Apache2::compat or not. > > > Thanks - I must have missed the distinction between the 2.0 API docs and > the compatability layer docs. no problem :) --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: docs-dev-unsubscribe[at]perl.apache.org For additional commands, e-mail: docs-dev-help[at]perl.apache.org
|