You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@serf.apache.org by rh...@apache.org on 2017/10/05 15:41:53 UTC

svn commit: r1811214 - /serf/trunk/test/serf_get.c

Author: rhuijben
Date: Thu Oct  5 15:41:53 2017
New Revision: 1811214

URL: http://svn.apache.org/viewvc?rev=1811214&view=rev
Log:
* test/serf_get.c
  Use the plain hostname for SNI in this sample application instead of
  the hostinfo that might include other information such as a portname.

Modified:
    serf/trunk/test/serf_get.c

Modified: serf/trunk/test/serf_get.c
URL: http://svn.apache.org/viewvc/serf/trunk/test/serf_get.c?rev=1811214&r1=1811213&r2=1811214&view=diff
==============================================================================
--- serf/trunk/test/serf_get.c (original)
+++ serf/trunk/test/serf_get.c Thu Oct  5 15:41:53 2017
@@ -34,7 +34,7 @@
 /* #define CONNECTION_CLOSE_HDR */
 
 typedef struct app_baton_t {
-    const char *hostinfo;
+    const char *hostname;
     int using_ssl;
     int head_request;
     int negotiate_http2;
@@ -223,7 +223,7 @@ static apr_status_t conn_setup(apr_socke
         serf_ssl_server_cert_chain_callback_set(conn_ctx->ssl_ctx, 
                                                 ignore_all_cert_errors, 
                                                 print_certs, NULL);
-        serf_ssl_set_hostname(conn_ctx->ssl_ctx, ctx->hostinfo);
+        serf_ssl_set_hostname(conn_ctx->ssl_ctx, ctx->hostname);
 
         *output_bkt = serf_bucket_ssl_encrypt_create(*output_bkt,
                                                      conn_ctx->ssl_ctx,
@@ -728,7 +728,7 @@ int main(int argc, const char **argv)
         app_ctx.head_request = 0;
     }
 
-    app_ctx.hostinfo = url.hostinfo;
+    app_ctx.hostname = url.hostname;
     app_ctx.pem_path = pem_path;
     app_ctx.pem_pwd = pem_pwd;