- Handle URLs with abbreviated scheme correctly.

Submitted by d@, actual patch taken from m17n flavor.
- Bump package revisions.
This commit is contained in:
naddy 2001-09-29 14:57:52 +00:00
parent 148ac2169e
commit 9dc28fda17
2 changed files with 27 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.25 2001/09/29 11:41:03 naddy Exp $
# $OpenBSD: Makefile,v 1.26 2001/09/29 14:57:52 naddy Exp $
ONLY_FOR_ARCHS= i386 sparc m68k
@ -14,7 +14,7 @@ V_IMG= 1.10
V_M17N= 0.19
DISTNAME= w3m-${V_BASE}
PKGNAME= ${DISTNAME}p2
PKGNAME= ${DISTNAME}p3
CATEGORIES= www
NEED_VERSION= 1.427
HOMEPAGE= http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/eng/
@ -59,11 +59,11 @@ ERRORS+= "Fatal: Flavors 'image' and 'm17n' are mutually exclusive."
.if ${FLAVOR:L:Mimage}
PKGNAME= ${DISTNAME}.${V_IMG}
PKGNAME= ${DISTNAME}.${V_IMG}p1
PATCHFILES= ${IMG_PATCH}
HOMEPAGE= http://www2u.biglobe.ne.jp/~hsaka/w3m/
DOCS+= README.img
PATCH_LIST+= base-mimehead_c
PATCH_LIST+= base-mimehead_c base-url_c
LIB_DEPENDS+= Imlib.19::graphics/imlib
.elif ${FLAVOR:L:Mm17n}

View File

@ -0,0 +1,23 @@
$OpenBSD: base-url_c,v 1.1 2001/09/29 14:57:52 naddy Exp $
--- url.c.orig Sat Sep 29 16:06:06 2001
+++ url.c Sat Sep 29 16:07:08 2001
@@ -605,6 +605,19 @@ parseURL(char *url, ParsedURL * p_url, P
else
p_url->scheme = SCM_LOCAL;
p = url;
+ if (!strncmp(p,"//",2)) {
+ /* URL begins with // */
+ /* it means that 'scheme:' is abbreviated */
+#ifdef CYGWIN
+ /* in CYGWIN, '//C/' doesn't means 'http://C/' */
+ if (IS_ALPHA(p[2]) && p[3] == '/') {
+ p_url->scheme = SCM_LOCAL;
+ goto analyze_file;
+ }
+#endif /* CYGWIN */
+ p += 2;
+ goto analyze_url;
+ }
goto analyze_file;
}
/* get host and port */