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 2020/12/02 10:07:39 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #2917: fix: refresh cached header when we set request header

spacewander commented on a change in pull request #2917:
URL: https://github.com/apache/apisix/pull/2917#discussion_r534043957



##########
File path: apisix/core/request.lua
##########
@@ -68,12 +68,25 @@ function _M.header(ctx, name)
 end
 
 
-function _M.set_header(header_name, header_value)
+function _M.set_header(ctx, header_name, header_value)
+    if type(ctx) == "string" then
+        -- It would be simpler to keep compatibility if we put 'ctx'
+        -- after 'header_value', but the style is too ugly!

Review comment:
       @membphis 
   Added.




----------------------------------------------------------------
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.

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