xref: /PHP-7.4/ext/curl/tests/bug79033.phpt (revision 38ad37ad)
1--TEST--
2Bug #79033 (Curl timeout error with specific url and post)
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_array($ch, [
11	CURLOPT_URL => "{$host}/get.inc?test=post",
12	CURLOPT_POST => true,
13    CURLOPT_POSTFIELDS => [],
14    CURLINFO_HEADER_OUT => true,
15	CURLOPT_RETURNTRANSFER => true,
16]);
17var_dump(curl_exec($ch));
18var_dump(curl_getinfo($ch)["request_header"]);
19?>
20--EXPECTF--
21string(%d) "array(0) {
22}
23"
24string(%d) "POST /get.inc?test=post HTTP/1.1
25Host: localhost:%d
26Accept: */*
27Content-Length: 0
28Content-Type: application/x-www-form-urlencoded
29
30"
31