> No, it would not concatenate the headers, otherwise it breaks
> set-cookie. For simple headers like above, you'd get the same
> result with modify-header and replace-header. The difference
> is visible when the header contains a comma :
>
> Set-Cookie: A=B; expires=Wed, 21 May 2014 05:11:16 GMT
> Set-Cookie: C=D; expires=Wed, 21 May 2014 05:11:16 GMT
>
> replace-header Set-Cookie (.*) \1;bar would give :
>
> Set-Cookie: A=B; expires=Wed, 21 May 2014 05:11:16 GMT; bar
> Set-Cookie: C=D; expires=Wed, 21 May 2014 05:11:16 GMT; bar
>
> modify-header Set-Cookie (.*) \1;bar would give :
>
> Set-Cookie: A=B; expires=Wed; bar, 21 May 2014 05:11:16 GMT; bar
> Set-Cookie: C=D; expires=Wed; bar, 21 May 2014 05:11:16 GMT; bar
>
> Maybe the names are not the best choices, I don't know. At least I
> tend to remember which one does what this way.

Good plan. Will do it this way. If I use buffer_replace2() on the
header repeatedly from under  http_res_get_intercept_rule() or
http_req_get_intercept_rule() it does not appear that it would cause
any problems - It is already being used from under
http_remove_header2() which is called from under those functions, but
maybe I missed something. Did I?

And, is buffer_replace2() the best tool for the job, or would you
suggest a different call?


-- 
Sasha Pachev

Fast Running Blog.
http://fastrunningblog.com
Run. Blog. Improve. Repeat.

Reply via email to