summaryrefslogtreecommitdiff
path: root/pith/url.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-07-18 22:51:20 -0600
committerEduardo Chappa <chappa@washington.edu>2013-07-18 22:51:20 -0600
commit9dcb8528d0ce6afb8afc1b0a219fc7eae0c9bb99 (patch)
tree71064fed8137c8662273c4733b32e91f05b9b3b7 /pith/url.c
parent3463dc142b787d8010cf9310caa7915f30a9e275 (diff)
downloadalpine-9dcb8528d0ce6afb8afc1b0a219fc7eae0c9bb99.tar.xz
* Added recognition of ws and wss URIs.
Diffstat (limited to 'pith/url.c')
-rw-r--r--pith/url.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/pith/url.c b/pith/url.c
index 1798320d..4550400c 100644
--- a/pith/url.c
+++ b/pith/url.c
@@ -82,9 +82,15 @@ rfc1738_scan(char *line, int *len)
* Make sure everyhing up to the colon is a known scheme...
*/
if(start && (n = colon - start) && !isdigit((unsigned char) *start)
- && (((n == 3
- && (*start == 'F' || *start == 'f')
- && !struncmp(start+1, "tp", 2))
+ && (((n == 2
+ && (*start == 'w' || *start == 'W')
+ && (*(start+1) == 's' || *(start+1) == 'S'))
+ || (n == 3
+ && (((*start == 'F' || *start == 'f')
+ && !struncmp(start+1, "tp", 2))
+ ||
+ ((*start == 'w' || *start == 'W')
+ && !struncmp(start+1, "ss", 2))))
|| (n == 4
&& (((*start == 'H' || *start == 'h')
&& !struncmp(start + 1, "ttp", 3))