diff --git a/spec/std/http/server/server_spec.cr b/spec/std/http/server/server_spec.cr index bcd27f7b4307..e57b774a47e2 100644 --- a/spec/std/http/server/server_spec.cr +++ b/spec/std/http/server/server_spec.cr @@ -422,30 +422,6 @@ module HTTP end end - describe "#bind_ssl" do - it "binds SSL server context" do - server = Server.new do |context| - context.response.puts "Test Server (#{context.request.headers["Host"]?})" - context.response.close - end - - server_context, client_context = ssl_context_pair - - socket = OpenSSL::SSL::Server.new(TCPServer.new("127.0.0.1", 0), server_context) - server.bind socket - ip_address1 = server.bind_ssl "127.0.0.1", 0, server_context - ip_address2 = socket.local_address - - spawn server.listen - Fiber.yield - - HTTP::Client.get("https://#{ip_address1}", tls: client_context).body.should eq "Test Server (#{ip_address1})\n" - HTTP::Client.get("https://#{ip_address2}", tls: client_context).body.should eq "Test Server (#{ip_address2})\n" - - server.close - end - end - describe "#listen" do it "fails after listen" do server = Server.new { } diff --git a/src/http/server.cr b/src/http/server.cr index 43f09b266960..7be04efcc5a5 100644 --- a/src/http/server.cr +++ b/src/http/server.cr @@ -258,12 +258,6 @@ class HTTP::Server def bind_tls(address : Socket::IPAddress, context : OpenSSL::SSL::Context::Server) : Socket::IPAddress bind_tls(address.address, address.port, context) end - - # DEPRECATED: Use `#bind_tls`. - # TODO: remove in 0.27.0 - def bind_ssl(*args) - bind_tls(*args) - end {% end %} # Parses a socket configuration from *uri* and adds it to this server.