Le 03/09/2015 14:45, [email protected] a écrit :
Author: icing
Date: Thu Sep 3 12:45:26 2015
New Revision: 1701005
URL: http://svn.apache.org/r1701005
Log:
changed Protocols default to http/1.1 only, updated documentation, changed
ap_select_protocol() to return NULL when no protocol could be agreed upon
Modified: httpd/httpd/trunk/server/core.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1701005&r1=1701004&r2=1701005&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Thu Sep 3 12:45:26 2015
@@ -433,6 +433,7 @@ static void *merge_core_dir_configs(apr_
static void *create_core_server_config(apr_pool_t *a, server_rec *s)
{
core_server_config *conf;
+ const char **np;
This introduce a new warning: unused variable 'np' [-Wunused-variable]
int is_virtual = s->is_virtual;
conf = (core_server_config *)apr_pcalloc(a, sizeof(core_server_config));
@@ -5303,7 +5304,7 @@ static int core_upgrade_handler(request_
if (offers && offers->nelts > 0) {
const char *protocol = ap_select_protocol(c, r, r->server,
offers);
- if (strcmp(protocol, ap_get_protocol(c))) {
+ if (protocol && strcmp(protocol, ap_get_protocol(c))) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
APLOGNO(02909)
"Upgrade selects '%s'", protocol);
/* Let the client know what we are upgrading to. */