-*- coding: utf-8 -*-
Changes with Apache 2.4.0
+ *) mod_log_config: Fix segfault when trying to log a nameless, valueless
+ cookie. PR 52256. [Rainer Canavan <rainer-apache 7val com>]
+
*) mod_ssl: when compiled against OpenSSL 1.0.1 or later, allow explicit
control of TLSv1.1 and TLSv1.2 through the SSLProtocol directive.
[Kaspar Brand]
while ((cookie = apr_strtok(cookies, ";", &last1))) {
char *name = apr_strtok(cookie, "=", &last2);
- char *value;
- apr_collapse_spaces(name, name);
-
- if (!strcasecmp(name, a) && (value = apr_strtok(NULL, "=", &last2))) {
- char *last;
- value += strspn(value, " \t"); /* Move past leading WS */
- last = value + strlen(value) - 1;
- while (last >= value && apr_isspace(*last)) {
- *last = '\0';
- --last;
+ if (name) {
+ char *value;
+ apr_collapse_spaces(name, name);
+
+ if (!strcasecmp(name, a) && (value = apr_strtok(NULL, "=", &last2))) {
+ char *last;
+ value += strspn(value, " \t"); /* Move past leading WS */
+ last = value + strlen(value) - 1;
+ while (last >= value && apr_isspace(*last)) {
+ *last = '\0';
+ --last;
+ }
+
+ return ap_escape_logitem(r->pool, value);
}
-
- return ap_escape_logitem(r->pool, value);
}
cookies = NULL;
}