1--TEST-- 2Test curl_opt() function with CURLOPT_HTTP_VERSION/CURL_HTTP_VERSION_1_1 3--CREDITS-- 4TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com> 5--SKIPIF-- 6<?php include 'skipif.inc'; ?> 7--FILE-- 8<?php 9 include 'server.inc'; 10 $host = curl_cli_server_start(); 11 12 // start testing 13 echo '*** Testing curl with HTTP/1.1 ***' . "\n"; 14 15 $url = "{$host}/get.inc?test=httpversion"; 16 $ch = curl_init(); 17 18 ob_start(); // start output buffering 19 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 20 curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 21 curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use 22 23 $curl_content = curl_exec($ch); 24 curl_close($ch); 25 26 var_dump( $curl_content ); 27?> 28--EXPECT-- 29*** Testing curl with HTTP/1.1 *** 30string(8) "HTTP/1.1" 31 32