views:

12

answers:

0

This question extends problem which was mentioned here: http://stackoverflow.com/questions/2577965/zend-framework-rest-service-http-status-code-problem

I am creating REST service and I am using both XML and JSON formats. In case of error I am returning proper HTTP code with content that describes error.

When I set HTTP code Apache sends apache error document. I tried overriding error document by adding ErrorDocument directives which points to index.php.

But the case is that in each response Apache appends index.php. Example:

HTTP/1.1 403 Forbidden
Date: Fri, 27 Aug 2010 12:40:54 GMT
Server: Apache/2.2.14 (Win32) mod_ssl/2.2.14 OpenSSL/0.9.8k
X-Powered-By: PHP/5.2.12 ZendServer
Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/
Set-Cookie: PHPSESSID=15fdf8l9k3rrklhv9detn05op4; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<Errors>
<Error>
<Code>1002</Code>
<Message>For specified private key does not exist</Message>
</Error>
</Errors>

index.php

What should I do to remove this ifnormation.