diff options
author | Remy <relst@relst.nl> | 2015-03-27 21:01:03 +0100 |
---|---|---|
committer | Remy <relst@relst.nl> | 2015-03-27 21:01:03 +0100 |
commit | 63dd818bd8b172ad955e0d0c604c2f2a35db8dd8 (patch) | |
tree | 555ba543e524581f5279e19ca894c551689fb915 | |
parent | 9681a2d7d7c2b4ecb14e481332102550c5c08eb8 (diff) | |
download | ssl-decoder-63dd818bd8b172ad955e0d0c604c2f2a35db8dd8.zip ssl-decoder-63dd818bd8b172ad955e0d0c604c2f2a35db8dd8.tar.gz ssl-decoder-63dd818bd8b172ad955e0d0c604c2f2a35db8dd8.tar.bz2 |
Use GET to retreive HTTP headers for servers that do not support HEAD requests. Fix #11
-rw-r--r-- | functions/connection.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/functions/connection.php b/functions/connection.php index ba30c5a..4280798 100644 --- a/functions/connection.php +++ b/functions/connection.php @@ -36,11 +36,12 @@ function server_http_headers($host, $port){ "allow_self_signed" => true, "sni_enabled" => true), 'http' => array( - 'method' => 'HEAD' + 'method' => 'GET' ) ) ); $headers = get_headers("https://$host:$port", 1); + if (!empty($headers)) { $headers = array_change_key_case($headers, CASE_LOWER); return $headers; @@ -590,10 +591,4 @@ if ( $read_stream === false ) { } - - - - - - ?> |