WordPress 2.7+ under LightTPD
發表於 | 7.25.2009 | 無回應
LightTPD 跑 WordPress 時出現的錯誤 (error.log)
(request.c.1115) POST-request, but content-length missing -> 411
主要是得明確定義 Content-Length 為 0 for a null body (is_null($r['body']))
即在 /wordpress/wp-includes/http.php 中, 第 245 行
加入 {{{$r['headers']['Content-Length'] = 0;}}}
如下所示
if ( is_null($r['body']) ) {
{{{$r['headers']['Content-Length'] = 0;}}}#第 245 行
$transports = WP_Http::_getTransport($r);
}
建立迴響