From 32436719d35dde638b5ef5163f3d454bf84471fd Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 20 Nov 2025 17:49:29 +0100 Subject: accept lowercase http methods --- it_url.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'it_url.class') diff --git a/it_url.class b/it_url.class index 48dbb6f..fe3daa1 100644 --- a/it_url.class +++ b/it_url.class @@ -276,8 +276,8 @@ static function curl_opts($p=array()) CURLOPT_FOLLOWLOCATION => $p['followlocation'], CURLOPT_MAXREDIRS => 20, CURLOPT_HTTPHEADER => $headers, - CURLOPT_CUSTOMREQUEST => $p['method'] ?: null, - CURLOPT_NOBODY => $p['method'] == 'HEAD', + CURLOPT_CUSTOMREQUEST => strtoupper($p['method']) ?: null, + CURLOPT_NOBODY => strtoupper($p['method']) == 'HEAD', CURLOPT_SAFE_UPLOAD => true, # disable special meaning of @value in POST forms (security) CURLOPT_PROTOCOLS => array_reduce($p['protocols'], fn($c, $v) => $c | $protocols[$v], 0), -- cgit v1.2.3