Project

General

Profile

Actions

Bug #17766

closed

Net::HTTP verify_callback is called three times when opening a connection

Added by jecain (Jim Cain) about 3 years ago. Updated about 3 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:103129]

Description

I've noticed that verify_callback is called three times when opening a connection. Here is an example: (Change "localhost" to whatever host can receive an HTTPS connection.)

ruby -e 'require "net/http"; Net::HTTP.start("localhost", 443, nil, nil, nil, nil, use_ssl: true, verify_callback: ->(v,s){puts "verify_callback"; true}) {}'

The output:

verify_callback
verify_callback
verify_callback

This requires awkwardness in the callback to account for the multiple calls per single connection.

Actions

Also available in: Atom PDF

Like0
Like0Like0