2014-01-08 2 views
1

나는 php-ews-master를 사용하여 Exchange 서버에 연결하려고하는데, 나는 한동안 고민 중이다. CURL_HTTP_VERSION_1_1php-ews-master/response error

나는 오류를 받고 있어요 :

  • 문제 (3) 청크 분할 인코딩 된 데이터이다. 내가 CURL_HTTP_VERSION_1_0을 수정하는 경우

나는 서버의 응답을 가지고 있지만 응답은 추가 문자를 많이 이런 이유로 그것이 유효하지 그리고 (나는 청크 응답 ??? 때문에이이 가정)가 XML 파일.

코드

내가 사용하려고 해요 : 도움을

$headers = array(
'Method: POST', 
'Connection: Keep-Alive', 
'User-Agent: PHP-SOAP-CURL', 
'Content-Type: text/xml; charset=utf-8', 
'SOAPAction: "'.$action.'"', 
); 
$this->ch = curl_init($location); 
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $this->validate); 
curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $this->validate); 
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers); 
curl_setopt($this->ch, CURLOPT_POST, true); 
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $request); 
curl_setopt($this->ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 
curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM); 
curl_setopt($this->ch, CURLOPT_USERPWD, $this->user.':'.$this->password);* 

$response = curl_exec($this->ch); 

감사합니다.

답변

0

해결책을 찾았습니다. 같은 문제에 직면 한 사람이 있다면 다음 줄을 추가하십시오.

curl_setopt ($ this-> ch, CURLOPT_SSLVERSION, 3);