> > OK I understand better now. However, I think that this transformation > is very specific and if we go down that route we'll have many similar > ones. I suggest that instead we focus on applying sed-like regex-based > transformations which will allow this and many other things at the same > time.
I will redo it using regular expressions and rename the option replace-header. > > Also, in your case, you seem to apply the change to the first header > found only, though in theory it should be applied to every header value > or every header line depending on the use case. That's probably one more > reason for doing it a-la-sed :-) This raises a question. Currently set-header deletes all of the earlier versions of the header and replaces them with only one that is new. If we are going to be consistent, it would make sense for replace-header to behave like set-header in this way. Are you OK with set-header and replace-header having a different behavior, do you want to change the behavior of set-header, or shall I just leave this part as is in my original patch? -- Sasha Pachev Fast Running Blog. http://fastrunningblog.com Run. Blog. Improve. Repeat.

