ALT Linux Bugzilla
– Attachment 1913 Details for
Bug 11559
apache2 не всегда отдаёт заголовки при использовании mod_ssl
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
apache2-2.2.4-alt-headers.ErrorDocument-0.1.patch
apache2-2.2.4-alt-headers.ErrorDocument-0.1.patch (text/plain), 6.87 KB, created by
solo
on 2007-04-19 19:04:38 MSD
(
hide
)
Description:
apache2-2.2.4-alt-headers.ErrorDocument-0.1.patch
Filename:
MIME Type:
Creator:
solo
Created:
2007-04-19 19:04:38 MSD
Size:
6.87 KB
patch
obsolete
> modules/http/http_protocol.c | 70 ++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 70 insertions(+), 0 deletions(-) > >diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c >index d8886af..4bf6227 100644 >--- a/modules/http/http_protocol.c >+++ b/modules/http/http_protocol.c >@@ -1101,6 +1101,12 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > int idx = ap_index_of_response(status); > char *custom_response; > const char *location = apr_table_get(r->headers_out, "Location"); >+ /* solo */ >+ server_rec * ss = r->server; >+ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: start"); >+ /* */ > > /* At this point, we are starting the response over, so we have to reset > * this value. >@@ -1121,6 +1127,10 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > * former. > */ > if (location == NULL) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (location == NULL) is TRUE."); >+ /* */ > location = apr_table_get(r->err_headers_out, "Location"); > } > /* We need to special-case the handling of 204 and 304 responses, >@@ -1128,16 +1138,28 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > * message body. Note that being assbackwards here is not an option. > */ > if (status == HTTP_NOT_MODIFIED) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (status == HTTP_NOT_MODIFIED) is TRUE."); >+ /* */ > ap_finalize_request_protocol(r); > return; > } > > if (status == HTTP_NO_CONTENT) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (status == HTTP_NOT_CONTENT) is TRUE."); >+ /* */ > ap_finalize_request_protocol(r); > return; > } > > if (!r->assbackwards) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (!r->assbackwards) is TRUE."); >+ /* */ > apr_table_t *tmp = r->headers_out; > > /* For all HTTP/1.x responses for which we generate the message, >@@ -1150,10 +1172,22 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > apr_table_clear(r->err_headers_out); > > if (ap_is_HTTP_REDIRECT(status) || (status == HTTP_CREATED)) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (ap_is_HTTP_REDIRECT(status) || (status == HTTP_CREATED)) is TRUE."); >+ /* */ > if ((location != NULL) && *location) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: ((location != NULL) && *location) is TRUE."); >+ /* */ > apr_table_setn(r->headers_out, "Location", location); > } > else { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: ((location != NULL) && *location) is FALSE."); >+ /* */ > location = ""; /* avoids coredump when printing, below */ > } > } >@@ -1164,6 +1198,10 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > > if (apr_table_get(r->subprocess_env, > "suppress-error-charset") != NULL) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (apr_table_get(r->subprocess_env, \"suppress-error-charset\") != NULL) is TRUE."); >+ /* */ > core_request_config *request_conf = > ap_get_module_config(r->request_config, &core_module); > request_conf->suppress_charset = 1; /* avoid adding default >@@ -1172,21 +1210,37 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > ap_set_content_type(r, "text/html"); > } > else { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (apr_table_get(r->subprocess_env, \"suppress-error-charset\") != NULL) is FALSE."); >+ /* */ > ap_set_content_type(r, "text/html; charset=iso-8859-1"); > } > > if ((status == HTTP_METHOD_NOT_ALLOWED) > || (status == HTTP_NOT_IMPLEMENTED)) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: ((status == HTTP_METHOD_NOT_ALLOWED) || (status == HTTP_NOT_IMPLEMENTED)) is TRUE."); >+ /* */ > apr_table_setn(r->headers_out, "Allow", make_allow(r)); > } > > if (r->header_only) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (r->header_only) is TRUE."); >+ /* */ > ap_finalize_request_protocol(r); > return; > } > } > > if ((custom_response = ap_response_code_string(r, idx))) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (custom_response = ap_response_code_string(r, idx)) is TRUE."); >+ /* */ > /* > * We have a custom response output. This should only be > * a text-string to write back. But if the ErrorDocument >@@ -1204,6 +1258,10 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > * it hasn't happened yet; we may never know if it fails. > */ > if (custom_response[0] == '\"') { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (custom_response[0] == '\"') is TRUE."); >+ /* */ > ap_rputs(custom_response + 1, r); > ap_finalize_request_protocol(r); > return; >@@ -1223,6 +1281,10 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > && apr_isdigit(r->status_line[2]) > && apr_isspace(r->status_line[3]) > && apr_isalnum(r->status_line[4])) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (r->status_line != NULL && strlen(r->status_line) > 4 && ...) is TRUE."); >+ /* */ > title = r->status_line; > } > >@@ -1244,6 +1306,10 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > NULL); > > if (recursive_error) { >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: (recursive_error) is TRUE."); >+ /* */ > ap_rvputs_proto_in_ascii(r, "<p>Additionally, a ", > status_lines[ap_index_of_response(recursive_error)], > "\nerror was encountered while trying to use an " >@@ -1253,6 +1319,10 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) > ap_rvputs_proto_in_ascii(r, "</body></html>\n", NULL); > } > ap_finalize_request_protocol(r); >+ /* solo */ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, >+ "ap_send_error_response: END."); >+ /* */ > } > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11559
:
1913
|
1926