Commit 49d71b4a authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Minor cleanup - use NOERRNO logging, more proper body test and
  log origin server TRACE denied.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@209394 13f79535-47bb-0310-9956-ffa450edef68
parent 33bc6263
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1688,7 +1688,10 @@ API_EXPORT(int) ap_send_http_trace(request_rec *r)

    if (conf->trace_enable == AP_TRACE_DISABLE) {
        ap_table_setn(r->notes, "error-notes",
                      "TRACE denied by server configuration");
                      "TRACE forbidden by server configuration");
        ap_table_setn(r->notes, "verbose-error-to", "*");
        ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
                      "TRACE forbidden by server configuration");
	return HTTP_FORBIDDEN;
    }

@@ -2112,7 +2115,7 @@ API_EXPORT(int) ap_setup_client_block(request_rec *r, int read_policy)
    }

    if ((r->read_body == REQUEST_NO_BODY) &&
        (r->read_chunked || (r->remaining > 0))) {
        && (r->read_length || r->read_chunked || r->remaining)) {
        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
                    "%s with body is not allowed for %s", r->method, r->uri);
        return HTTP_REQUEST_ENTITY_TOO_LARGE;
+2 −2
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@ static int proxy_handler(request_rec *r)
            ap_table_setn(r->notes, "error-notes",
                           "TRACE forbidden by server configuration");
            ap_table_setn(r->notes, "verbose-error-to", "*");
            ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
            ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
                          "proxy: TRACE forbidden by server configuration");
            return HTTP_FORBIDDEN;
        }
@@ -306,7 +306,7 @@ static int proxy_handler(request_rec *r)
            ap_table_setn(r->notes, "error-notes",
                           "TRACE with request body is not allowed");
            ap_table_setn(r->notes, "verbose-error-to", "*");
            ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
            ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
                          "proxy: TRACE with request body is not allowed");
            return HTTP_REQUEST_ENTITY_TOO_LARGE;
        }