diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-06-28 00:18:20 +0000 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-28 00:18:20 +0000 |
commit | 0065d23c624a52a1888ea48f882cce1211fea6b5 (patch) | |
tree | 93ed9ff9e186859c71b871018cbb51f733cf9054 | |
parent | 7921109a237c89daad6f69b22fc521ce4ac29e24 (diff) | |
download | evolution-data-server-0065d23c624a52a1888ea48f882cce1211fea6b5.tar.gz |
More fixes.
2004-06-27 Jeffrey Stedfast <fejj@novell.com>
* camel-url-scanner.c (camel_url_web_end): More fixes.
-rw-r--r-- | camel/ChangeLog | 4 | ||||
-rw-r--r-- | camel/camel-url-scanner.c | 30 |
2 files changed, 9 insertions, 25 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7fd7c209c..ffa85aead 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,7 @@ +2004-06-27 Jeffrey Stedfast <fejj@novell.com> + + * camel-url-scanner.c (camel_url_web_end): More fixes. + 2004-06-25 Jeffrey Stedfast <fejj@novell.com> * camel-url-scanner.c (camel_url_web_end): Fixed to handle :pass diff --git a/camel/camel-url-scanner.c b/camel/camel-url-scanner.c index 49b53518a..891a47610 100644 --- a/camel/camel-url-scanner.c +++ b/camel/camel-url-scanner.c @@ -325,35 +325,17 @@ gboolean camel_url_web_end (const char *in, const char *pos, const char *inend, urlmatch_t *match) { register const char *inptr = pos; - int parts = 0, digits, port; gboolean passwd = FALSE; const char *save; char close_brace; + int port; inptr += strlen (match->pattern); close_brace = url_stop_at_brace (in, match->um_so); /* find the end of the domain */ - if (is_digit (*inptr)) { - domain_literal: - /* domain-literal */ - do { - digits = 0; - while (inptr < inend && is_digit (*inptr) && digits < 3) { - inptr++; - digits++; - } - - parts++; - - if (*inptr != '.' && parts != 4) - return FALSE; - else if (*inptr == '.') - inptr++; - - } while (parts < 4); - } else if (is_atom (*inptr)) { + if (is_atom (*inptr)) { /* might be a domain or user@domain */ save = inptr; while (inptr < inend) { @@ -404,8 +386,8 @@ camel_url_web_end (const char *in, const char *pos, const char *inend, urlmatch_ while (inptr < inend && is_digit (*inptr) && port < 65536) port = (port * 10) + (*inptr++ - '0'); - if (port >= 65536) { - if (!passwd && inptr < inend) { + if (!passwd && (port >= 65536 || *inptr == '@')) { + if (inptr < inend) { /* this must be a password? */ goto passwd; } @@ -423,9 +405,7 @@ camel_url_web_end (const char *in, const char *pos, const char *inend, urlmatch_ if ((inptr + 2) < inend) { if (*inptr == '@') { inptr++; - if (is_digit (*inptr)) - goto domain_literal; - else if (is_domain (*inptr)) + if (is_domain (*inptr)) goto domain; } |