summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2025-11-20 17:49:29 +0100
committerUrban Müller2025-11-20 17:49:29 +0100
commit32436719d35dde638b5ef5163f3d454bf84471fd (patch)
tree8fc41ca26e80d49f7a9b48ba10aae9bdf429c048
parent45ed8e5d57b21fff54bd2a694318779da6258e97 (diff)
downloaditools-32436719d35dde638b5ef5163f3d454bf84471fd.tar.gz
itools-32436719d35dde638b5ef5163f3d454bf84471fd.tar.bz2
itools-32436719d35dde638b5ef5163f3d454bf84471fd.zip
accept lowercase http methods
-rw-r--r--it_url.class4
1 files changed, 2 insertions, 2 deletions
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),