summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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),