aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plum/server
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-11-09 19:07:21 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-11-09 19:07:21 +0900
commit11be104f7ac9e2fe91bd5f82a1bb2489692cdce8 (patch)
treea3b99e935d6ad125dcac6ff657d88dd8d14f0381 /lib/plum/server
parent4b9266ad29d6f8b344ea73b74b0184026902ed0f (diff)
downloadplum-11be104f7ac9e2fe91bd5f82a1bb2489692cdce8.tar.gz
rename {Connection,Stream}Error to Remote{Connection,Stream}Error and create Local*Error
Diffstat (limited to 'lib/plum/server')
-rw-r--r--lib/plum/server/connection.rb2
-rw-r--r--lib/plum/server/http_connection.rb2
-rw-r--r--lib/plum/server/https_connection.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/plum/server/connection.rb b/lib/plum/server/connection.rb
index 450dcf6..a82d4aa 100644
--- a/lib/plum/server/connection.rb
+++ b/lib/plum/server/connection.rb
@@ -29,7 +29,7 @@ module Plum
def negotiate!
unless CLIENT_CONNECTION_PREFACE.start_with?(@buffer.byteslice(0, 24))
- raise ConnectionError.new(:protocol_error) # (MAY) send GOAWAY. sending.
+ raise RemoteConnectionError.new(:protocol_error) # (MAY) send GOAWAY. sending.
end
if @buffer.bytesize >= 24
diff --git a/lib/plum/server/http_connection.rb b/lib/plum/server/http_connection.rb
index 7111bb4..cb49a29 100644
--- a/lib/plum/server/http_connection.rb
+++ b/lib/plum/server/http_connection.rb
@@ -23,7 +23,7 @@ module Plum
private
def negotiate!
super
- rescue ConnectionError
+ rescue RemoteConnectionError
# Upgrade from HTTP/1.1
offset = @_http_parser << @buffer
@buffer.byteshift(offset)
diff --git a/lib/plum/server/https_connection.rb b/lib/plum/server/https_connection.rb
index 09e360f..bac1b4b 100644
--- a/lib/plum/server/https_connection.rb
+++ b/lib/plum/server/https_connection.rb
@@ -10,7 +10,7 @@ module Plum
if @sock.respond_to?(:cipher) # OpenSSL::SSL::SSLSocket-like
if CIPHER_BLACKLIST.include?(@sock.cipher.first) # [cipher-suite, ssl-version, keylen, alglen]
on(:negotiated) {
- raise ConnectionError.new(:inadequate_security)
+ raise RemoteConnectionError.new(:inadequate_security)
}
end
end