2008/08 15
今天尝试使用curl请求lighttpd数据,发现总是报错(417) Expectation Failed。
经查,是lighttp不支持curl默认发送的头信息: Expect: 100-continue.

解决方式:

在curl中指定发送一个空的Except头信息即可解决。
代码:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

Defined tags for this entry: ,

Posted by rollenc

0 Trackbacks

  1. No Trackbacks

0 Comments

Display comments as(Linear | Threaded)
  1. No comments

Add Comment


You can use [geshi lang=lang_name [,ln={y|n}]][/lang] tags to embed source code snippets
E-Mail addresses will not be displayed and will only be used for E-Mail notifications