Author: tlsa
Date: Mon Oct 31 17:23:02 2011
New Revision: 13108
URL:
http://source.netsurf-browser.org?rev=13108&view=rev
Log:
Fix empty port separator and redundant port removal when credentials are present.
Modified:
trunk/netsurf/utils/nsurl.c
Modified: trunk/netsurf/utils/nsurl.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/utils/nsurl.c?rev=13108&a...
==============================================================================
--- trunk/netsurf/utils/nsurl.c (original)
+++ trunk/netsurf/utils/nsurl.c Mon Oct 31 17:23:02 2011
@@ -854,7 +854,7 @@
sec_start = norm_start + colon - pegs->at +
skip;
if (url->scheme != NULL && length -
- (colon - pegs->at + 1) == 2 &&
+ (colon - pegs->at + skip) == 2 &&
*sec_start == '8' &&
*(sec_start + 1) == '0' &&
strncmp(lwc_string_data(
@@ -865,7 +865,7 @@
flags |= NSURL_F_NO_PORT;
}
- if (length - (colon - pegs->at + 1) <= 0) {
+ if (length - (colon - pegs->at + skip) <= 0) {
/* No space for a port after the colon
*/
flags |= NSURL_F_NO_PORT;