xref: /PHP-7.1/ext/curl/tests/bug66109.phpt (revision 41b655d9)
1--TEST--
2Bug #66109 (Option CURLOPT_CUSTOMREQUEST can't be reset to default.)
3--SKIPIF--
4<?php include 'skipif.inc'; ?>
5--FILE--
6<?php
7include 'server.inc';
8$host = curl_cli_server_start();
9$ch = curl_init();
10curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=method");
11curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12
13curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
14var_dump(curl_exec($ch));
15
16curl_setopt($ch, CURLOPT_CUSTOMREQUEST, NULL);
17var_dump(curl_exec($ch));
18
19curl_close($ch);
20
21?>
22--EXPECTF--
23string(6) "DELETE"
24string(3) "GET"
25