]> sjero.net Git - wget/commitdiff
[svn] Tell OpenSSL to renegotiate automatically (mode SSL_MODE_AUTO_RETRY).
authorhniksic <devnull@localhost>
Fri, 26 Aug 2005 10:42:31 +0000 (03:42 -0700)
committerhniksic <devnull@localhost>
Fri, 26 Aug 2005 10:42:31 +0000 (03:42 -0700)
By Jeremy Shapiro.

src/ChangeLog
src/http.c
src/openssl.c

index d6ad3dd44a6e74a5d817bf6710e507b004fde559..f4c0e1b102bbcdfb8c8686417211b963dfbe3ef6 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-26  Jeremy Shapiro  <jnshapiro@gmail.com>
+
+       * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
+
 2005-08-23  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
index b83be2bbda8936b96d7284d06e4772d3f250240b..3ef8f47b110c5174694adca4024b38848c1b82c7 100644 (file)
@@ -1940,9 +1940,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
   else
     fp = output_stream;
 
-  /* #### This confuses the timestamping code that checks for file
-     size.  Maybe we should save some additional information?  */
-  if (opt.save_headers)
+  /* This confuses the timestamping code that checks for file size.
+     #### The timestamping code should be smarter about file size.  */
+  if (opt.save_headers && hs->restval == 0)
     fwrite (head, 1, strlen (head), fp);
 
   /* Now we no longer need to store the response header. */
index 253b903b65b7bc9da5574d1cc45f71edcdc9327e..ea382adf1357b7f1611b7ba41e52caf4e0e933d0 100644 (file)
@@ -225,6 +225,10 @@ ssl_init ()
      handles them correctly), allow them in OpenSSL.  */
   SSL_CTX_set_mode (ssl_ctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
 
+  /* The OpenSSL library can handle renegotiations automatically, so
+     tell it to do so.  */
+  SSL_CTX_set_mode (ssl_ctx, SSL_MODE_AUTO_RETRY);
+
   return true;
 
  error: