summaryrefslogtreecommitdiffstats
path: root/mod_certwatch.c
diff options
context:
space:
mode:
authorRob Stradling <rob@comodo.com>2017-10-20 11:40:15 +0100
committerRob Stradling <rob@comodo.com>2017-10-20 11:40:15 +0100
commit8df444850a385e97bb4f4264e9d483709635f37d (patch)
tree64b54afd2c6cd24a5e783b29791f53227ecc3fde /mod_certwatch.c
parentdfac264aad32a997445bc9182b66e83b7f72e0cd (diff)
downloadmod_certwatch-master.zip
mod_certwatch-master.tar.gz
mod_certwatch-master.tar.bz2
Pass .json requests through to the database.HEADorigin/masterorigin/HEADmaster
Diffstat (limited to 'mod_certwatch.c')
-rw-r--r--mod_certwatch.c9
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 */