From: Stefan Knoblich Date: Fri, 6 Jan 2012 22:08:45 +0000 (+0100) Subject: mod_httapi: Fix Cache-Control max-age= parameter string (length) check X-Git-Tag: v1.2-rc1~19^2~1^2~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=27a3f1ccf2fc049b479feb153badffe223911a62;p=thirdparty%2Ffreeswitch.git mod_httapi: Fix Cache-Control max-age= parameter string (length) check This is probably what you had in mind... Signed-off-by: Stefan Knoblich --- diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index e88ce1d5c7..ae87ad5c40 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -1949,7 +1949,7 @@ static switch_status_t write_meta_file(http_file_context_t *context, const char if (headers && (cc = switch_event_get_header(headers, "Cache-Control")) && (p = switch_stristr("max-age=", cc))) { p += 8; - if (p) { + if (!zstr(p)) { ttl = atoi(p); if (ttl < 0) ttl = globals.cache_ttl; }