diff options
author | RichardHitt <rbh00@netcom.com> | 2013-01-15 01:23:37 -0800 |
---|---|---|
committer | RichardHitt <rbh00@netcom.com> | 2013-01-15 01:23:37 -0800 |
commit | d5fbea3411d069cf8c0ae636518a7dc86dd692f6 (patch) | |
tree | 24d360c3d6f50e7570b0aefada4e05fc6a61ba60 /src/common | |
parent | be2d100d2d06c3ea31934fea30289bc1c88343ea (diff) |
Fix DOMAIN and TLD per rfc 1738, thanks Arnavion
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/url.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/url.c b/src/common/url.c index 1f3277cd..f3460aca 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -333,10 +333,10 @@ do_an_re(const char *word,int *start, int *end, int *type) } /* Miscellaneous description --- */ -#define DOMAIN "[-a-z0-9]+(\\.[-a-z0-9]+)*\\." -#define TLD "[a-z][-a-z0-9]*[a-z]" +#define DOMAIN "([a-z0-9]|([a-z0-9][-a-z0-9]*[a-z0-9]))\\." +#define TLD "([a-z][-a-z0-9]*[a-z0-9])" #define IPADDR "[0-9]+(\\.[0-9]+){3}" -#define HOST "(" DOMAIN TLD "|" IPADDR ")" +#define HOST "(" "(" "(" DOMAIN ")*" TLD ")" "|" IPADDR ")" #define OPT_PORT "(:[1-9][0-9]{0,4})?" GRegex * |