diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-06-28 08:18:20 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-28 08:18:20 +0800 |
commit | 90d63d2b2a612734925dd632ff3bea063d80827f (patch) | |
tree | c0475bbae255715b7a11bb1275706e9208db2e82 /camel | |
parent | a01cbc2ce9993e0322e3f69a058bb039b0a5757e (diff) | |
download | gsoc2013-evolution-90d63d2b2a612734925dd632ff3bea063d80827f.tar gsoc2013-evolution-90d63d2b2a612734925dd632ff3bea063d80827f.tar.gz gsoc2013-evolution-90d63d2b2a612734925dd632ff3bea063d80827f.tar.bz2 gsoc2013-evolution-90d63d2b2a612734925dd632ff3bea063d80827f.tar.lz gsoc2013-evolution-90d63d2b2a612734925dd632ff3bea063d80827f.tar.xz gsoc2013-evolution-90d63d2b2a612734925dd632ff3bea063d80827f.tar.zst gsoc2013-evolution-90d63d2b2a612734925dd632ff3bea063d80827f.zip |
More fixes.
2004-06-27 Jeffrey Stedfast <fejj@novell.com>
* camel-url-scanner.c (camel_url_web_end): More fixes.
svn path=/trunk/; revision=26532
Diffstat (limited to 'camel')
-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 7fd7c209c4..ffa85aead9 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 49b53518ad..891a47610e 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; } |