2012-08-08 1 views
0

항목을 삭제하려고하면 오류가 반환됩니까?Zend/Google 앱 - 항목 삭제 - 일치하는 경우 og etag 속성이 필요함

항목을 삭제하기 위해 삭제 방법을 호출하기로되어 있지 않습니까?

$this->client = Zend_Gdata_ClientLogin::getHttpClient($this->admin_user, $this->admin_pass, 'cp'); 
$this->client->setHeaders('If-Match: *'); 
$this->gdata = new Zend_Gdata($this->client); 
$this->gdata->setMajorProtocolVersion(3); 

$feed = $gdata->getFeed($query); 
foreach($feed as $entry){ 
    $entry->delete(); 
} 

오류 :

ERROR: Expected response code 200, got 403 
If-Match or If-None-Match header or entry etag attribute required 

답변

2

편집 파일 App.php 라인 (538)의 주위에 (내 경우는 이상), 그 기능 prepareRequest() 변화 안에이 : 여기에

if ($method == 'DELETE') { 
    $rawData = null; 
} 

if ($method == 'DELETE') { 
    $rawData = null; 
    $headers['If-Match'] = '*'; 
} 
+0

코어 파일 그러나 그것은 작동합니다! – Nitesh