[
https://issues.apache.org/jira/browse/TS-4510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15333034#comment-15333034
]
ASF GitHub Bot commented on TS-4510:
------------------------------------
Github user jpeach commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/697#discussion_r67284564
--- Diff: plugins/experimental/ts_lua/ts_lua_server_response.c ---
@@ -198,13 +230,25 @@ ts_lua_server_response_header_set(lua_State *L)
field_loc = TSMimeHdrFieldFind(http_ctx->server_response_bufp,
http_ctx->server_response_hdrp, key, key_len);
if (remove) {
- if (field_loc) {
+ while (field_loc) {
--- End diff --
All these should be
```C
while (field_loc != TS_NULL_MLOC)
```
> ts_lua plugin - support multiple headers with the same name
> -----------------------------------------------------------
>
> Key: TS-4510
> URL: https://issues.apache.org/jira/browse/TS-4510
> Project: Traffic Server
> Issue Type: Improvement
> Components: Lua, Plugins
> Reporter: Kit Chan
> Assignee: Kit Chan
> Fix For: 7.0.0
>
>
> Currently ts_lua plugin does not handle well when the request or response
> contains multiple header with the same name.
> We either retrieve the last value of first value of these headers and when we
> set new value to the header, we only change the first one and leave the rest
> there still.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)