wok annotate busybox/stuff/busybox-1.26-bug9471.u @ rev 20175

fake-sane: fix path
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 24 14:55:51 2018 +0100 (2018-01-24)
parents
children
rev   line source
pascal@19654 1 --- busybox-1.26.2/networking/wget.c
pascal@19654 2 +++ busybox-1.26.2/networking/wget.c
pascal@19654 3 @@ -1093,12 +1093,19 @@
pascal@19654 4 }
pascal@19654 5
pascal@19654 6 fflush(sfp);
pascal@19654 7 - /* If we use SSL helper, keeping our end of the socket open for writing
pascal@19654 8 - * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF)
pascal@19654 9 - * even after child closes its copy of the fd.
pascal@19654 10 - * This helps:
pascal@19654 11 - */
pascal@19654 12 - shutdown(fileno(sfp), SHUT_WR);
pascal@19654 13 +/* Tried doing this unconditionally.
pascal@19654 14 + * Cloudflare and nginx/1.11.5 are shocked to see SHUT_WR on non-HTTPS.
pascal@19654 15 + */
pascal@19654 16 +#if ENABLE_FEATURE_WGET_OPENSSL || ENABLE_FEATURE_WGET_SSL_HELPER
pascal@19654 17 + if (target.protocol == P_HTTPS) {
pascal@19654 18 + /* If we use SSL helper, keeping our end of the socket open for writing
pascal@19654 19 + * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF)
pascal@19654 20 + * even after child closes its copy of the fd.
pascal@19654 21 + * This helps:
pascal@19654 22 + */
pascal@19654 23 + shutdown(fileno(sfp), SHUT_WR);
pascal@19654 24 + }
pascal@19654 25 +#endif
pascal@19654 26
pascal@19654 27 /*
pascal@19654 28 * Retrieve HTTP response line and check for "200" status code.