diff options
author | Stefan Fritsch <sf@apache.org> | 2012-04-20 13:22:20 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2012-04-20 13:22:20 +0200 |
commit | aaa0d67dcc6ecf77c46099456afa6bf0d46b0441 (patch) | |
tree | 956baeb1aab6574a6a9487dda7ffe70fe060c302 /modules | |
parent | When receiving http on https, send the error response with http 1.0 (diff) | |
download | apache2-aaa0d67dcc6ecf77c46099456afa6bf0d46b0441.tar.xz apache2-aaa0d67dcc6ecf77c46099456afa6bf0d46b0441.zip |
Remove the link in the speaking-http-on-https error message.
With SNI, the link will usually be wrong. So better send no link at all.
PR: 50823
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1328326 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ssl/ssl_engine_kernel.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index 1db1ab124f..e514a74bdf 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -141,30 +141,10 @@ int ssl_hook_ReadReq(request_rec *r) } if (sslconn->non_ssl_request == NON_SSL_SET_ERROR_MSG) { - const char *errmsg; - char *thisurl; - char *thisport = ""; - int port = ap_get_server_port(r); - - if (!ap_is_default_port(port, r)) { - thisport = apr_psprintf(r->pool, ":%u", port); - } - - thisurl = ap_escape_html(r->pool, - apr_psprintf(r->pool, "https://%s%s/", - ap_get_server_name_for_url(r), - thisport)); - - errmsg = apr_psprintf(r->pool, - "Reason: You're speaking plain HTTP " - "to an SSL-enabled server port.<br />\n" - "Instead use the HTTPS scheme to access " - "this URL, please.<br />\n" - "<blockquote>Hint: " - "<a href=\"%s\"><b>%s</b></a></blockquote>", - thisurl, thisurl); - - apr_table_setn(r->notes, "error-notes", errmsg); + apr_table_setn(r->notes, "error-notes", + "Reason: You're speaking plain HTTP to an SSL-enabled " + "server port.<br />\n Instead use the HTTPS scheme to " + "access this URL, please.<br />\n"); /* Now that we have caught this error, forget it. we are done * with using SSL on this request. |