Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Validating server certificates in Jetty HTTP Client 9.3.5.v20151012

On 15/04/16 20:35, Simone Bordet wrote:

>> However, connect() never seemed to actually be called, so my IP address
>> validation never happened.
> 
> That would be strange. HttpClientTransport.connect() is the sole way
> to open a *new* connection to a host.
> HttpClient pools connections, so perhaps you made an initial request
> that opened the connection, and you were expecting the checks to
> happen on a second request to the same destination ?

Oooh, that *is* interesting... I wonder what I did wrong? I put an
unconditional throw in there to see if it was ever triggering my
"validation failed" code, to no avail. I'll try it again!

>> What I ended up doing was...
> 
> Too complicated :

I agree :-)

> 
> HttpClientTransport.connect() *is* being called, and perhaps that's
> the way to go.
> Alternatively you can provide your own SocketAddressResolver to HttpClient.
> 

I might look into that, thanks!

ABS

-- 
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/

Attachment: signature.asc
Description: OpenPGP digital signature


Back to the top