From 1d05913ee75dfa24ae24bd60cdf0d7b25ec9d1a2 Mon Sep 17 00:00:00 2001 From: Nikolay Shaplov Date: Fri, 3 Jan 2025 00:59:39 +0300 Subject: [PATCH] To make Net::SSLeay::Handle example work with actual server one should send an empty line right afther GET request --- lib/Net/SSLeay/Handle.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Net/SSLeay/Handle.pm b/lib/Net/SSLeay/Handle.pm index 4d006a54..f182dfbe 100644 --- a/lib/Net/SSLeay/Handle.pm +++ b/lib/Net/SSLeay/Handle.pm @@ -23,7 +23,7 @@ handled as standard file handles. tie(*SSL, "Net::SSLeay::Handle", $host, $port); - print SSL "GET / HTTP/1.0\r\n"; + print SSL "GET / HTTP/1.0\r\n\r\n"; shutdown(\*SSL, 1); print while (); close SSL; @@ -33,7 +33,7 @@ handled as standard file handles. Net::SSLeay::Handle allows you to request and receive HTTPS web pages using "old-fashion" file handles as in: - print SSL "GET / HTTP/1.0\r\n"; + print SSL "GET / HTTP/1.0\r\n\r\n"; and @@ -322,7 +322,7 @@ non-SSL sockets and do the right thing. tie(*SSL, "Net::SSLeay::Handle", $host, $port); - print SSL "GET / HTTP/1.0\r\n"; + print SSL "GET / HTTP/1.0\r\n\r\n"; shutdown(\*SSL, 1); print while (); close SSL;