wok diff 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 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/busybox/stuff/busybox-1.26-bug9471.u Wed Jan 24 14:55:51 2018 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 +--- busybox-1.26.2/networking/wget.c 1.5 ++++ busybox-1.26.2/networking/wget.c 1.6 +@@ -1093,12 +1093,19 @@ 1.7 + } 1.8 + 1.9 + fflush(sfp); 1.10 +- /* If we use SSL helper, keeping our end of the socket open for writing 1.11 +- * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF) 1.12 +- * even after child closes its copy of the fd. 1.13 +- * This helps: 1.14 +- */ 1.15 +- shutdown(fileno(sfp), SHUT_WR); 1.16 ++/* Tried doing this unconditionally. 1.17 ++ * Cloudflare and nginx/1.11.5 are shocked to see SHUT_WR on non-HTTPS. 1.18 ++ */ 1.19 ++#if ENABLE_FEATURE_WGET_OPENSSL || ENABLE_FEATURE_WGET_SSL_HELPER 1.20 ++ if (target.protocol == P_HTTPS) { 1.21 ++ /* If we use SSL helper, keeping our end of the socket open for writing 1.22 ++ * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF) 1.23 ++ * even after child closes its copy of the fd. 1.24 ++ * This helps: 1.25 ++ */ 1.26 ++ shutdown(fileno(sfp), SHUT_WR); 1.27 ++ } 1.28 ++#endif 1.29 + 1.30 + /* 1.31 + * Retrieve HTTP response line and check for "200" status code.