From 6e09bb02b383fba804380aa61e672bb398a8c6be Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Wed, 29 Jan 2003 05:07:18 +0000 Subject: [PATCH] Fix If header parsing when a non-mod_dav lock token is passed to it. We'll now just skip over it rather than aborting. PR: 16452 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98524 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/dav/main/util.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 6336b7f7a9..763f357eaf 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Fix If header parsing when a non-mod_dav lock token is passed to it. + PR 16452. [Justin Erenkrantz] + *) Fix bug where 'Satisfy Any' without an AuthType lost all MIME information (and more). Related to PR 9076. [André Malo] diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c index 1772982788..8cbc76a970 100644 --- a/modules/dav/main/util.c +++ b/modules/dav/main/util.c @@ -574,8 +574,16 @@ static dav_error * dav_add_if_state(apr_pool_t *p, dav_if_header *ih, if ((err = (*locks_hooks->parse_locktoken)(p, state_token, &new_sl->locktoken)) != NULL) { - /* ### maybe add a higher-level description */ - return err; + /* In cases where the state token is invalid, we'll just skip + * it rather than return 400. + */ + if (err->error_id == DAV_ERR_LOCK_UNK_STATE_TOKEN) { + return NULL; + } + else { + /* ### maybe add a higher-level description */ + return err; + } } } else -- 2.50.1