diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-03-01 21:07:08 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-03-01 21:07:08 +0100 |
commit | 67bd9bfe6c38831e14fe7122f1d84391472498f8 (patch) | |
tree | 1e6da8ef31ec0c2e610c655aae70aa63c3b726ec /modules/session | |
parent | Add an exemple. (diff) | |
download | apache2-67bd9bfe6c38831e14fe7122f1d84391472498f8.tar.xz apache2-67bd9bfe6c38831e14fe7122f1d84391472498f8.zip |
mod_session: save one apr_strtok() in session_identity_decode().
When the encoding is invalid (missing '='), no need to parse further.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887050 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/session')
-rw-r--r-- | modules/session/mod_session.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/session/mod_session.c b/modules/session/mod_session.c index a2b4a3e608..01f41fe5d0 100644 --- a/modules/session/mod_session.c +++ b/modules/session/mod_session.c @@ -413,8 +413,8 @@ static apr_status_t session_identity_decode(request_rec * r, session_rec * z) char *plast = NULL; const char *psep = "="; char *key = apr_strtok(pair, psep, &plast); - char *val = apr_strtok(NULL, psep, &plast); if (key && *key) { + char *val = apr_strtok(NULL, sep, &plast); if (!val || !*val) { apr_table_unset(z->entries, key); } |