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.

Given your description above, it sounds like the behaviour Conan describes 
would be a bug, but I can almost imagine it being a feature :)

> 
> -- Leif 
> 
>> 
>> From Conan <conanm...@gmail.com>
>> Subject remap plugin question when pristine_host_hdr is enabled
>> Date Fri, 29 Jul 2011 15:25:25 GMT
>> 
>> In proxy/http/remap/RemapPlugins.cc, line 147 say "plugin did not change
>> host, port or path, copying from mapping rule" when TSRemapDoRemap return
>> TSREMAP_NO_REMAP or TSREMAP_NO_REMAP_STOP.
>> 
>> If url_remap.pristine_host_hdr is enabled, I think host should not
>> be copied(changed). This affects mapFromUrl/requestUrl (or more)
>> of TSRemapRequestInfo. In a remap plugin chain, second plugin will get
>> a "copied" Url if first plugin return TSREMAP_NO_REMAP, which maybe
>> not reasonable.
>> 
>> 2012/4/13 James Peach <jamespe...@me.com>
>> 
>>> On 12/04/2012, at 10:18 AM, Leif Hedstrom wrote:
>>> 
>>>> On 4/12/12 9:54 AM, James Peach wrote:
>>>>> On Apr 12, 2012, at 7:43 AM, Leif Hedstrom wrote:
>>>>> 
>>>>>> I think when I fiddled with this, using the reqbufp was ok.
>>>>> Alright, I'll take that for a spin ...
>>>> 
>>>> 
>>>> If you get it to work, let us know. We might need to document this, I
>>> had the same confusion too (and I wrote the damn thing...).
>>> 
>>> Yep requestBufp works; which actually worries me a bit because that's
>>> definitely not the right marshall buffer. I guess that the buffer is only
>>> used if you modify the URL?
>>> 
>>> J
>>> 

Reply via email to