I have a COM component that uses the Response object to return a PDF file to a PHP script running on Apache. I also use the Response object AddHeader method to return custom headers; Content-Dispostion, Content-Length, and Error-Code which we use in our homemade protocol. This works just fine. However, when an error occurs I need to set the Error-Code custom header so the PHP script knows what to do. I set Content-Type to text/html, use AddHeader to set Error-Code appropriately, and then do a Response.Write with an HTML message that contains the reason for the error. When writing out the PDF file the Error-Code header ALWAYS gets sent. When writing out the error message the Error-Code header NEVER gets sent. I've looked everywhere and can't find any reason for this behavior. It's like ASP is just ignoring that header when it puts the HTTP message together. Anybody got any ideas? Thanx!