spray/spray — pull request #328 by mpilquist (2013-06-19 22:05:33+00:00)
Title: =Fix bug where custom ClientSSLEngingProvider is not propagated to HttpHostConnectionSlot

While experimenting with 1.1-M8 on Scala 2.10.1, I was not able to get a custom ClientSSLEngineProvider working. I was using a ClientSSLEngineProvider backed by an SSLContext with a custom TrustManager and when performing HTTPS requests, Spray was using the default SSLContext.

Through trial and error, I've determined that this PR fixes the issue but I'm not sure why. Note that the sslEngineProvider must be passed explicitly in both HttpManager and HttpHostConnector. Otherwise, the default ClientSSLEngineProvider is passed. As far as I can tell, this shouldn't be necessary because there is an implicit in scope in both cases.

I'm providing this PR as an example as to what fixed the problem - not as a production quality fix. I suspect there may be something else going on that needs the attention of one of the core spray developers. I'm not sure where to add tests for this either.