Skip to content

Instantly share code, notes, and snippets.

@p0pr0ck5
Created March 21, 2017 18:37
Show Gist options
  • Save p0pr0ck5/6a0abff9c5aea9a8fd85607483f2a0a8 to your computer and use it in GitHub Desktop.
Save p0pr0ck5/6a0abff9c5aea9a8fd85607483f2a0a8 to your computer and use it in GitHub Desktop.
vagrant@precise64:/kong$ git diff
diff --git a/spec/02-integration/05-proxy/01-router_spec.lua b/spec/02-integration/05-proxy/01-router_spec.lua
index e990926..1fb40ae 100644
--- a/spec/02-integration/05-proxy/01-router_spec.lua
+++ b/spec/02-integration/05-proxy/01-router_spec.lua
@@ -266,9 +266,9 @@ describe("Router", function()
headers = { ["Host"] = "preserved.com" },
})
- assert.res_status(200, res)
- local json = cjson.decode((res:read_body()))
- assert.equal("preserved.com", json.headers.Host)
+ --assert.res_status(200, res)
+ --local json = cjson.decode((res:read_body()))
+ assert.equal("preserved.com", res.__req[1].headers.host)
end)
pending("preserves downstream host+port if enabled", function()
diff --git a/spec/helpers.lua b/spec/helpers.lua
index c17a06f..5787bb5 100644
--- a/spec/helpers.lua
+++ b/spec/helpers.lua
@@ -182,6 +182,10 @@ function resty_http_proxy_mt:send(opts)
end
end
+ res.__req = {
+ opts
+ }
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment