Gnus development mailing list
 help / color / mirror / Atom feed
From: wmperry@aventail.com (William M. Perry)
Cc: ding@gnus.org
Subject: Re: W3 doesn't like bad URLs
Date: 28 Dec 1998 16:48:44 -0500	[thread overview]
Message-ID: <863e60uedf.fsf@kramer.bp.aventail.com> (raw)
In-Reply-To: Karl Kleinpaste's message of "03 Dec 1998 12:03:30 -0500"

Karl Kleinpaste <karl@justresearch.com> 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...
> 
> <img src="http:/ABT_gif/Asia_Logo.gif" width=608 height=80 border=0 alt="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


      reply	other threads:[~1998-12-28 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-03 17:03 Karl Kleinpaste
1998-12-28 21:48 ` William M. Perry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=863e60uedf.fsf@kramer.bp.aventail.com \
    --to=wmperry@aventail.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).