From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/20039 Path: main.gmane.org!not-for-mail From: wmperry@aventail.com (William M. Perry) Newsgroups: gmane.emacs.gnus.general Subject: Re: W3 doesn't like bad URLs Date: 28 Dec 1998 16:48:44 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <863e60uedf.fsf@kramer.bp.aventail.com> References: Reply-To: wmperry@aventail.com NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 X-Trace: main.gmane.org 1035158348 15147 80.91.224.250 (20 Oct 2002 23:59:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:59:08 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA22608 for ; Mon, 28 Dec 1998 16:52:30 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id PAB06634; Mon, 28 Dec 1998 15:52:16 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 28 Dec 1998 15:52:22 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id PAA11896 for ; Mon, 28 Dec 1998 15:52:12 -0600 (CST) Original-Received: from slow.bp.aventail.com (usrpri1-6.kiva.net [208.143.10.195]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA22596 for ; Mon, 28 Dec 1998 16:52:03 -0500 (EST) Original-Received: from kramer.bp.aventail.com (kramer.bp.aventail.com [192.168.2.2]) by slow.bp.aventail.com (8.8.5/8.8.5) with ESMTP id QAA26322; Mon, 28 Dec 1998 16:51:14 -0800 Original-Received: (from wmperry@localhost) by kramer.bp.aventail.com (8.8.5/8.8.5) id QAA07291; Mon, 28 Dec 1998 16:52:31 -0500 Original-To: Karl Kleinpaste X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7 writes: > It's no surprise that W3 doesn't approve, but a particular website > sometimes provides text/html containing bogus host-less URLs; some of > these pages get forwarded to an internal newsgroup here, and so I get > *Warning* buffers containing... > > (1) (url/warning) Malformed URL got passed into url-retrieve. > Either `url-expand-file-name' is broken in some > way, or an incorrect URL was manually entered (more likely). > > ...along with a minibuf message... > > Malformed URL: `http:/ABT_gif/Asia_Logo.gif' > > ...all of which is caused by... > > Welcome to AsiaBizTech Web Site > > ...and if I turn on `debug-on-error,' I get a stack trace: [...] > Admittedly, it's Wrong for this site to serve pages containing broken > URLs, but on the other hand, when this happens, the article doesn't even > render, because the interaction with bringing up the *Warning* removes > the rest of my buffers from visibility. Would it be possible for W3 to > be a bit more forgiving, and render the rest of the page anyhow? > > Just wondering...there isn't some pseudostandard involved here, where a > host-less URL implicitly refers to the host from which the containing > page emanated, such that W3 is responsible for figuring this out on its > own? Nope - if something specifies the scheme portion of the url (http), then that is _it_, and no relative expansion is to be done. So sayeth the URI/URL/URN expansion RFCs. Does this patch help at all? -bp Index: url-http.el =================================================================== RCS file: /gd/gnu/cvsroot/w3/lisp/url-http.el,v retrieving revision 1.1.1.2 diff -c -w -c -w -r1.1.1.2 url-http.el *** url-http.el 1998/12/18 02:19:36 1.1.1.2 --- url-http.el 1998/12/28 21:46:39 *************** *** 549,564 **** (if (equal port "") (setq port "80")) (if (equal file "") (setq file "/")) (if (not server) ! (progn ! (url-warn ! 'url ! (eval-when-compile ! (concat ! "Malformed URL got passed into url-retrieve.\n" ! "Either `url-expand-file-name' is broken in some\n" ! "way, or an incorrect URL was manually entered (more likely)." ! ))) ! (error "Malformed URL: `%s'" url))) (if (or (not (member port url-bad-port-list)) (funcall url-confirmation-func (concat --- 549,555 ---- (if (equal port "") (setq port "80")) (if (equal file "") (setq file "/")) (if (not server) ! (message "Malformed URL: `%s'" url) (if (or (not (member port url-bad-port-list)) (funcall url-confirmation-func (concat *************** *** 600,606 **** 'url-after-change-function)))))) (progn (ding) ! (url-warn 'security "Aborting connection to bad port...")))))) (defun url-https (url) ;; Retrieve a URL via SSL --- 591,597 ---- 'url-after-change-function)))))) (progn (ding) ! (url-warn 'security "Aborting connection to bad port..."))))))) (defun url-https (url) ;; Retrieve a URL via SSL