diff options
author | Rob Stradling <rob@comodo.com> | 2017-10-20 11:40:15 +0100 |
---|---|---|
committer | Rob Stradling <rob@comodo.com> | 2017-10-20 11:40:15 +0100 |
commit | 8df444850a385e97bb4f4264e9d483709635f37d (patch) | |
tree | 64b54afd2c6cd24a5e783b29791f53227ecc3fde | |
parent | dfac264aad32a997445bc9182b66e83b7f72e0cd (diff) | |
download | mod_certwatch-8df444850a385e97bb4f4264e9d483709635f37d.zip mod_certwatch-8df444850a385e97bb4f4264e9d483709635f37d.tar.gz mod_certwatch-8df444850a385e97bb4f4264e9d483709635f37d.tar.bz2 |
Pass .json requests through to the database.HEADorigin/masterorigin/HEADmaster
-rw-r--r-- | mod_certwatch.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod_certwatch.c b/mod_certwatch.c index 05d7398..95fd55e 100644 --- a/mod_certwatch.c +++ b/mod_certwatch.c @@ -373,13 +373,16 @@ static int certwatch_contentHandler( if (!t_certWatchDirConfig) return DECLINED; - /* If there's a dot in the path, decline to handle it here: - images, robots.txt, etc */ + /* Isolate the path component of the URI */ t_uri = apr_pstrdup(v_request->pool, v_request->unparsed_uri); t_value = ap_strchr(t_uri, '?'); if (t_value) *t_value = '\0'; - if (ap_strchr(t_uri, '.') != NULL) + + /* If there's a dot in the path, decline to handle it here (except for + *.json): images, robots.txt, etc */ + t_value = ap_strrchr(t_uri, '.'); + if ((t_value != NULL) && (strcmp(t_value, ".json") != 0)) return DECLINED; /* Process this request */ |