Skip to content

Commit

Permalink
Merge pull request #1031 from 3scale/release-3.5.1
Browse files Browse the repository at this point in the history
Release 3.5.1
  • Loading branch information
davidor authored May 8, 2019
2 parents 706cdbc + d590922 commit e5863aa
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [3.5.1] - 2019-05-07

Apart from the changes mentioned in this section, this version also includes the changes introduced in `3.5.0-rc1` that were not included in `3.5.0`.

## Added

- Ability to configure client certificate chain depth [PR #1006](https://github.com/3scale/APIcast/pull/1006)
- Ability to configure client certificate chain depth [PR #1006](https://github.com/3scale/APIcast/pull/1006), [THREESCALE-2383](https://issues.jboss.org/browse/THREESCALE-2383)

## Fixed

- Segfault when normalizing some client certificates [PR #1006](https://github.com/3scale/APIcast/pull/1006)
- Fixed incorrect connection reuse for requests on different domains [PR #1021](https://github.com/3scale/APIcast/pull/1021), [THREESCALE-2205](https://issues.jboss.org/browse/THREESCALE-2205)

## [3.5.0] - 2019-05-07

Expand All @@ -22,7 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Do not send OpenResty version in the `Server` response header [PR #997](https://github.com/3scale/APIcast/pull/997)
- Do not send OpenResty version in the `Server` response header [PR #997](https://github.com/3scale/APIcast/pull/997), [THREESCALE-1989](https://issues.jboss.org/browse/THREESCALE-1989)
- When using OIDC, the "no-body" option is now set when contacting the 3scale backend. This option helps reducing the workload in the 3scale backend and the network traffic [#998](https://github.com/3scale/APIcast/pull/998), [THREESCALE-2006](https://issues.jboss.org/browse/THREESCALE-2006)

## [3.5.0-beta1] - 2019-03-12
Expand Down Expand Up @@ -604,7 +609,7 @@ expressed might change in future releases.
### Changed
- Major rewrite using JSON configuration instead of code generation.

[Unreleased]: https://github.com/3scale/apicast/compare/v3.5.0-rc1...HEAD
[Unreleased]: https://github.com/3scale/apicast/compare/v3.5.1...HEAD
[2.0.0]: https://github.com/3scale/apicast/compare/v0.2...v2.0.0
[3.0.0-alpha1]: https://github.com/3scale/apicast/compare/v2.0.0...v3.0.0-alpha1
[3.0.0-alpha2]: https://github.com/3scale/apicast/compare/v3.0.0-alpha1...v3.0.0-alpha2
Expand Down Expand Up @@ -639,3 +644,4 @@ expressed might change in future releases.
[3.5.0-beta1]: https://github.com/3scale/apicast/compare/v3.4.0...v3.5.0-beta1
[3.5.0-rc1]: https://github.com/3scale/apicast/compare/v3.5.0-beta1...v3.5.0-rc1
[3.5.0]: https://github.com/3scale/apicast/compare/v3.5.0-beta1...v3.5.0
[3.5.1]: https://github.com/3scale/apicast/compare/v3.5.0...v3.5.1
2 changes: 1 addition & 1 deletion gateway/src/apicast/version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return "3.5.0"
return "3.5.1"
4 changes: 3 additions & 1 deletion gateway/src/resty/http/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ local function connect_direct(httpc, request)
local uri = request.uri
local host = uri.host
local ip, port = httpc:resolve(host, nil, uri)
local ok, err = httpc:connect(ip, port or default_port(uri))

local options = { pool = format('%s:%s', host, port) }
local ok, err = httpc:connect(ip, port or default_port(uri), options)

if not ok then return nil, err end

Expand Down
42 changes: 42 additions & 0 deletions spec/resty/http/proxy_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,47 @@ describe('resty.http.proxy', function()
assert.same(200, res.status)
assert.match('GET http://127.0.0.1:1984/request HTTP/1.1', res:read_body())
end)

-- Regression test. Ref: https://issues.jboss.org/browse/THREESCALE-2205
context('when different subdomains resolve to the same IP', function()
local request_domain_1 = { url = 'http://test.example.com/', method = 'GET' }
local request_domain_2 = { url = 'http://prod.example.com/', method = 'GET' }

before_each(function()
-- Make everything resolve to the same IP
local resty_resolver = require 'resty.resolver.http'
stub(resty_resolver, 'resolve', function() return "1.1.1.1", 80 end)
end)

context('and it uses a http proxy', function()
before_each(function()
_M:reset({ http_proxy = 'http://127.0.0.1:1984' })
end)

it('does not reuse the connection', function()
local proxy = _M.new(request_domain_1)
proxy:request(request_domain_1):read_body()
proxy:set_keepalive()

proxy = _M.new(request_domain_2)
assert.same(0, proxy:get_reused_times())
end)
end)

context('and it does not use an http proxy', function()
before_each(function()
_M:reset({})
end)

it('does not reuse the connection', function()
local proxy = _M.new(request_domain_1)
proxy:request(request_domain_1):read_body()
proxy:set_keepalive()

proxy = _M.new(request_domain_2)
assert.same(0, proxy:get_reused_times())
end)
end)
end)
end)
end)

0 comments on commit e5863aa

Please sign in to comment.