You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/03 12:51:41 UTC

[GitHub] [apisix] tzssangglass commented on a change in pull request #4961: fix(debug-mode): duplicate response headers in debug mode

tzssangglass commented on a change in pull request #4961:
URL: https://github.com/apache/apisix/pull/4961#discussion_r701865979



##########
File path: apisix/plugin.lua
##########
@@ -299,18 +299,33 @@ local function trace_plugins_info_for_debug(plugins)
         core.table.insert(t, plugins[i].name)
     end
     if is_http and not ngx.headers_sent then
-        core.response.add_header("Apisix-Plugins", core.table.concat(t, ", "))
+        if ctx then
+            local debug_headers = ctx.debug_headers
+            if debug_headers then
+                if type(t) == "string" then

Review comment:
       done

##########
File path: t/debug/debug-mode.t
##########
@@ -238,11 +238,9 @@ passed
 GET /hello
 --- yaml_config eval: $::yaml_config
 --- response_headers
-Apisix-Plugins: response-rewrite, limit-conn, limit-count, response-rewrite, response-rewrite
+Apisix-Plugins: response-rewrite, limit-conn, limit-count
 --- response_body
 yes
---- error_log

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org