src/contrib/serf/ssltunnel.c
/* SSL tunnel is needed, push a CONNECT request on the connection. */
SSL tunnel is needed, push a CONNECT request on the connection.
SSL tunnel is needed push a CONNECT request on the connection .
apr_status_t serf__ssltunnel_connect(serf_connection_t *conn)
{
    req_ctx_t *ctx;
    apr_pool_t *ssltunnel_pool;
    apr_pool_create(&ssltunnel_pool, conn->pool);
    ctx = apr_palloc(ssltunnel_pool, sizeof(*ctx));
    ctx->pool = ssltunnel_pool;
    ctx->uri = apr_psprintf(ctx->pool, "%s:%d", conn->host_info.hostname,
                            conn->host_info.port);
    conn->ssltunnel_ostream = serf__bucket_stream_create(conn->allocator,
                                                         detect_eof,
                                                         conn);
    serf__ssltunnel_request_create(conn,
                                   setup_request,
                                   ctx);
    conn->state = SERF_CONN_SETUP_SSLTUNNEL;
    serf__log_skt(CONN_VERBOSE, __FILE__, conn->skt,
                  "setting up ssl tunnel on connection.\n");
    return APR_SUCCESS;
}
apr_status_t serf__ssltunnel_connect ( serf_connection_t * conn ) { req_ctx_t * ctx ; apr_pool_t * ssltunnel_pool ; apr_pool_create ( & ssltunnel_pool , conn -> pool ) ; ctx = apr_palloc ( ssltunnel_pool , sizeof ( * ctx ) ) ; ctx -> pool = ssltunnel_pool ; ctx -> uri = apr_psprintf ( ctx -> pool , " " , conn -> host_info . hostname , conn -> host_info . port ) ; conn -> ssltunnel_ostream = serf__bucket_stream_create ( conn -> allocator , detect_eof , conn ) ; serf__ssltunnel_request_create ( conn , setup_request , ctx ) ; conn -> state = SERF_CONN_SETUP_SSLTUNNEL ; serf__log_skt ( CONN_VERBOSE , __FILE__ , conn -> skt , " \n " ) ; return APR_SUCCESS ; }
SSL tunnel is needed, push a CONNECT request on the connection.
SSL tunnel is needed push a CONNECT request on the connection .