From 1a2528643f3c4c7f941156803518d8690ef6a35f Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Wed, 2 Oct 2013 12:07:44 -0400 Subject: [PATCH] Add ws:// and wss:// as valid absolute URIs Add case to is_absolute_uri(...) to match ws:// and wss:// so that rewrite rules involving absolute websockets URIs will not be treated as file paths. --- modules/mappers/mod_rewrite.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 5627e66f943..eb585fb0327 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -589,6 +589,17 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs) return 7; } break; + case 'w': + case 'W': + if (!strncasecmp(uri, "s://", 4)) { /* ws:// */ + *sqs = 1; + return 5; + } + else if (!strncasecmp(uri, "ss://", 5)) { /* wss:// */ + *sqs = 1; + return 6; + } + break; } return 0;