From 41e5742a9e06148998f8dc01a42193bb394ad548 Mon Sep 17 00:00:00 2001 From: Andy C Date: Fri, 24 Jan 2025 02:02:07 -0500 Subject: [PATCH] [demo] for HTTPS client over pipes Can use socat, openssl s_client But they are limited - you only get one request per process. It would be nice to have multiple requests per process. --- demo/https.sh | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100755 demo/https.sh diff --git a/demo/https.sh b/demo/https.sh new file mode 100755 index 0000000000..d365d18461 --- /dev/null +++ b/demo/https.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# +# Testing how to send requests without curl +# +# Client features +# +# - SSL, for HTTPS +# - Connection: Keep-Alive, for latency +# - Timeouts, for robustness +# - Client side redirects +# - Sending arbitrary headers, for auth +# - Encoding: URL encoding, multi-part/MIME +# - It would be nice to offload this encoding, similar to how CGI v2 offloads +# parsing +# - Large streaming uploasd and downloads - this might need to be a separate +# request, e.g. to the wwup process +# +# Probably don't care about: +# - HTTP Cache - we might have a different mechanism - this is very complex and +# "best effort" +# - or there can be local cache of the "Oils SQL Waist" +# - Cookies? Not sure +# +# Not sure: +# - Proxy support + +with-openssl() { + # Hm, it works for google.com, yahoo, HN, dreamhost.com/ + # + # But Dreamhost shared hosting doesn't like it for some reason - get 400 + # error + local hostname=${1:-www.google.com} + + #openssl s_client -connect $hostname:443 <