httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Yu" <albert...@imtf.ie>
Subject core_output_filter() problem
Date Fri, 13 Jun 2003 10:44:09 GMT
Hi,

I am debugging on httpd 2.0.45. In core_output_filter() (in source file core.c),
if I return HTTP_SERVICE_UNAVAILABLE,
WebDAV server answers "HTTP/1.1 200 OK" with an error page.

I try to handle an error case in core_output_filter():
(See comments at "if (rv == 89)" ):


static apr_status_t core_output_filter(
               ap_filter_t *f,
               apr_bucket_brigade *b)
{

.................

        if (rv != APR_SUCCESS) {

            ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
                         "core_output_filter: writing data to the network");

/**
 *  I get  "Unsupported file system operation" (error code 89), then I try
 *  to return HTTP_SERVICE_UNAVAILABLE. But when I reach here
 *  in WebDAV server, WebDAV server answers "HTTP/1.1 200 OK"
 *  with an error page "Error 503". See the full answer of my test from WebDAV
 * server below in this mail. It is worth to mention that if I don't handle
 * it here, I get a blank page from WebDAV server.
 */

            if (rv == 89)
                return HTTP_SERVICE_UNAVAILABLE;   // Added
by me

            if (more)
                apr_brigade_destroy(more);

            ..................

            }

        ..............

}

===========================================================
 Full error answer from WebDAV server:
===========================================================

$telnet 192.168.2.138 8068
Trying 192.168.2.138...
Connected to 192.168.2.138.
Escape character is '^]'.
GET /lts/testpmo/FILE-3 HTTP/1.1
Host: 192.168.2.138:8068

HTTP/1.1 200 OK
Date: Thu, 12 Jun 2003 09:06:59 GMT
Server: Apache/2.0.45 (Unix) DAV/2
Last-Modified: Thu, 22 May 2003 13:04:44 GMT
ETag: "6-18b80-63579300"
Accept-Ranges: bytes
Content-Length: 101248
Content-Type: text/plain; charset=ISO-8859-1


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xml:lang="en">
<head>
<title>Service unavailable!</title>
<link rev="made" href="mailto:you@your.address" />
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
    body { color: #000000; background-color: #FFFFFF; }
    a:link { color: #0000CC; }
    p, address {margin-left: 3em;}
    span {font-size: smaller;}
/*]]>*/--></style>
</head>

<body>
<h1>Service unavailable!</h1>
<p>

    The server is temporarily unable to service your
    request due to maintenance downtime, capacity
    problems, or the document is offline. Please try again
later.

</p>
<p>
If you think this is a server error, please contact
the <a href="mailto:you@your.address">webmaster</a>.

</p>

<h2>Error 503</h2>
<address>
  <a href="/">192.168.2.138</a><br />

  <span>Thu Jun 12 11:06:59 2003<br />
  Apache/2.0.45 (Unix) DAV/2</span>
</address>
</body>
</html>

Connection closed by foreign host.


===========================================================

Who knows where the problem is? Please help me.


Thanks for your help in advance.


Best regards,

Albert

-----------------------------
Albert Yu
( Yu Yizhuan )
Software Engineer

email:  albert.yu@imtf.ie
phone:  +353 21 4910500
direct:  +353 21 4910503
fax: +353 21 4320589



Mime
View raw message