Probably the easiest method would be to modify the Filter::HTTPD that the PoCo uses.
On 10/12/07, Ashley Pond <[EMAIL PROTECTED]> wrote: > Hi. (Long time casual fan, occasional user of POE, first time wisdom > seeker.) > > I have a POE app I'm working on/with which uses PoCo::HTTP::Client. I > want to attach some additional security to the application's calls to > its remote API server. > > My idea is to take a user keyed signature of the request as_string > (always going to be POST) and stuff it in a new header, like > "X-signed-post" or whatever. The security stuff (keys and certificates > and checks) are all done and working great in other places. I just need > to figure out where to hook into *every* HTTP::Request object that goes > through the application. It could be done on each HTTP::Request before > it's given to the app but that would be tedious, less secure, and leave > duplicated code everywhere. > > I think I need to subclass PoCo::Client::HTTP::Request, right? Just > override new(), add my signature header, then SUPER::new(@_). But where > do I plug PoCo::Client::HTTP::Request back into the application? It's > spawning a PoCo::Client::HTTP for its ua. > > I see that Daisuke Maki touched on plugging in the request class here: > http://www.mail-archive.com/poe@perl.org/msg03615.html > > Did that make it into the code base? Any other ideas if not? > > Sorry to be a bit dumb about it but I really do not want to write the > code twice, or make it messy (server/client code can get hard to read > quickly if not written as cleanly as possible), or get it plain wrong > and wonder why it isn't working. > > Thank you! > -Ashley >