Permalink
Browse files

client: add missing SSL enabling option

  • Loading branch information...
1 parent 90b25fb commit a46c5c2db96449ab4fb8e9bce9d6d864a245fbe2 @sirthias sirthias committed Oct 8, 2012
@@ -41,7 +41,9 @@ trait ConnComponent {
log.debug("Opening connection {} to {}:{}", index, host, port)
pendingResponses = 0
connection = Connecting
- httpClient.tell(HttpClient.Connect(host, port), Reply.withContext(this))
+ import HttpClient._
+ val connect = if (sslEnabled) Connect(host, port, SslEnabled) else Connect(host, port)
+ httpClient.tell(connect, Reply.withContext(this))
dispatch(ctx)
case Connecting =>
@@ -29,6 +29,7 @@ import cc.spray.io._
class HttpConduit(val httpClient: ActorRef,
val host: String,
val port: Int = 80,
+ val sslEnabled: Boolean = false,
val dispatchStrategy: DispatchStrategy = DispatchStrategies.NonPipelined(),
val settings: ConduitSettings = ConduitSettings())
extends Actor with ActorLogging with ConnComponent {

0 comments on commit a46c5c2

Please sign in to comment.