mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-22 06:06:30 +09:00
Test the pooled-connection class check on its own, and name the class
The rejection cases built plain Net::HTTP connections that were also unpinned or proxied, so they failed the guard either way. They're built as WebPush::Connections::HTTP now, so each fails only for its stated reason, and a pinned, direct, TLS plain Net::HTTP is refused for being one. The error says which class is required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2daa01e26b
commit
edbc779f4d
2 files changed
+6
-5
No files matched your search
@@ -42,7 +42,7 @@ class WebPush::Connections
|
||||
|
||||
def request(http, request)
|
||||
unless http.is_a?(HTTP) && http.ipaddr && !http.proxy? && http.use_ssl? && !http.started?
|
||||
raise ArgumentError, "Only new, direct TLS connections pinned to an address are pooled"
|
||||
raise ArgumentError, "Only new, direct TLS connections pinned to an address and opened as WebPush::Connections::HTTP are pooled"
|
||||
end
|
||||
address = [ http.address, http.port, http.ipaddr ]
|
||||
|
||||
|
||||
Reference in new issue
Block a user