On Apr 13, 2012, at 9:22 AM, James Peach <jamespe...@me.com> wrote: > On Apr 13, 2012, at 6:01 AM, Leif Hedstrom wrote: > >> On Apr 12, 2012, at 10:17 PM, Conan <conanm...@gmail.com> wrote: >> >>> hi, I use requestBufp to read the request. But mapFromUrl/requestUrl will >>> be changed in a situation, which is not what you want. here is my email >>> last year. >> >> >> Hmmm, no the To and From URLs should never change, or be changed. Ideally >> they should be const, but those changes would have been invasive. These URLs >> are from remap.config, not the request. > >> James, maybe we (I.e you) should see if we can either fix this by providing >> for a special remap.config "reqp" constant (it should be constant, and the >> same for all threads and requests), or making To and From URLs constant? > > It doesn't matter to me right now, but I'll need to test Conan's case > eventually. I was hoping to be able to cache the to and from URLs, but > obviously if they change I can't do that. >
They can change when the remap.config is reloaded . But, a reload of remap.config also reinstates the plugin, so it should be safe to keep the To and From URLs as Lua objects for as long as the plugin instance is used (you get called when you are unloaded). If To and From URLs change, it does sound like a bug. I can take a look later, omw to Moab now. -- Leif