Alexey Zapparov
Alexey Zapparov
Hm. That's definitely a bug. I'll be happy to look at once will have time (next week).
Yeah, that's doable - we will need to improve https://github.com/httprb/form_data/blob/master/lib/http/form_data/multipart.rb to accept an array pairs instead: ``` ruby form: [ ['metadata', '{}'], ['file', '...'], # ... ] ```
Although it's doable to allow pass different SNI, I don't see how this is a normal use case. From what I understand you want to do something like this?: ```...
In any case, from my understanding, @httprb/core it's pretty doable to allow pass SNI hostname to be used instead of [`req.uri.host`](https://github.com/httprb/http/blob/master/lib/http/connection.rb#L158).
Ok. So here's the tricky part: this should also mess with `Host` header to be same as SNI. In other words, it seems like the API should in fact look...
@tarcieri I was thinking about that, but that IMO will make API look a bit weird: ``` ruby HTTP.get("https://a.example.com/foo/bar", :host => "b.example.com") ``` So in the example above it will...
@tarcieri isn't `ssl.hostname = ...` is what used for both SNI and certificate verification? https://github.com/httprb/http/blob/4bc1223c5bbaf85dfc142f353a30594242c7a4bb/lib/http/timeout/null.rb#L32-L34 Probably because of being pretty weak in this topic I thought that it's used for...
Oh. At least I have correctly man'ed on SNI then :D In this case `:host` option seems more like the best option to me now... But I guess host verification...
> use case where you want/need to connect to an IP address, but connect to a given vhost over SSL I agree about that. Just thinking that: ``` ruby HTTP.connect("1.2.3.4").get("https://abc.example.com/foobar")...
Now as I wrote this and looking at the pseudo code, both variants seems OK to me.