mod_http_cache: allow underscore in amazon s3 hostname

This commit is contained in:
Chris Rienzo committed 2014-01-03 16:21:48 -05:00
1 parent 3ca06e1ea7
commit ae7371e7c5
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@
int aws_s3_is_s3_url(const char *url)
{
/* AWS bucket naming rules are complex... this match only supports virtual hosting of buckets */
return !zstr(url) && switch_regex_match(url, "^https?://[a-z0-9][-a-z0-9.]{1,61}[a-z0-9]\\.s3\\.amazonaws\\.com/.*$") == SWITCH_STATUS_SUCCESS;
return !zstr(url) && switch_regex_match(url, "^https?://[a-z0-9_][-a-z0-9._]{1,61}[a-z0-9_]\\.s3\\.amazonaws\\.com/.*$") == SWITCH_STATUS_SUCCESS;
}
/**