回复: TSMimeHdrFieldNext

2014-08-16 Thread portl4t . cn
I think we have to create FetchSM with all the headers from the client request, should not we? Is there any other way to get all the headers from the client request? -- portl4t...@gmail.com 在 2014年8月17日 星期日,上午9:32,James Peach 写道: > On Aug 16, 2014, at 5:55 PM, portl4t...@gmail.com > (mailt

Re: TSMimeHdrFieldNext

2014-08-16 Thread James Peach
On Aug 16, 2014, at 8:29 AM, Brian Geffon wrote: > I'm definitely +1 for functor/iterator semantics, ideally it could be done > in such a way as to preserve backwards compatability. My initial reaction is against a callback-based API because that's not consistent with the existing API patterns.

Re: TSMimeHdrFieldNext

2014-08-16 Thread Alan M. Carroll
I think there are two reasonable approaches - 1) Iterator style. In this case we either create a new iterator type or re-use the FieldHandle as an iterator. In this case you get a handle to the first field, and then re-use it for each field. This saves the expense of allocating a new handle for

Re: TSMimeHdrFieldNext

2014-08-16 Thread James Peach
On Aug 15, 2014, at 3:13 PM, Nick Kew wrote: > > On 15 Aug 2014, at 21:55, James Peach wrote: > >> What's a real use case for iterating over all the headers? > > Ironbee. Or any WAF, or WAF framework. ah, waf and header whitelisting makes sense > > Or performance analysis tools. > > -- >

Re: 回复: TSMimeHdrFieldNext

2014-08-16 Thread James Peach
On Aug 16, 2014, at 5:55 PM, portl4t...@gmail.com wrote: > I use this api heavily, I think we have to iterate over all headers if we > want to create FetchSM. Why? To serialize the mime headers? > I use this api in some plugins, such as Combo, ESI, Slice and so on. > Every time if we want to in

回复: TSMimeHdrFieldNext

2014-08-16 Thread portl4t . cn
I use this api heavily, I think we have to iterate over all headers if we want to create FetchSM. I use this api in some plugins, such as Combo, ESI, Slice and so on. Every time if we want to intercept the HttpSM and create several FetchSM to construct the real response, this api will be used.

Re: TSMimeHdrFieldNext

2014-08-16 Thread Brian Geffon
I'm definitely +1 for functor/iterator semantics, ideally it could be done in such a way as to preserve backwards compatability. On Aug 16, 2014 10:35 PM, "Leif Hedstrom" wrote: > I have some mixed feeling on this. Such as, is us TSMimeHdrFieldGet a > better candidate to improve for looping over

Re: TSMimeHdrFieldNext

2014-08-16 Thread Leif Hedstrom
I have some mixed feeling on this. Such as, is us TSMimeHdrFieldGet a better candidate to improve for looping over all fields ? Or even a new API with functor semantics? TSMimeHdrFieldGet at least avoids one loop to avoid finding the slotnum > On Aug 16, 2014, at 5:29 AM, Brian Geffon wrote: >

Re: TSMimeHdrFieldNext

2014-08-16 Thread Brian Geffon
If no one has already started on a fix I can take this. Brian On Aug 16, 2014 6:13 AM, "Nick Kew" wrote: > > On 15 Aug 2014, at 21:55, James Peach wrote: > > > What's a real use case for iterating over all the headers? > > Ironbee. Or any WAF, or WAF framework. > > Or performance analysis tools