Browse files

From: "William G. Davis" <>

Subject: not standards compliant: croaks when it shouldn't.
Date: Fri, 3 Oct 2003 23:29:57 -0700 (PDT)

Hi Gisle.

I'm currently working on a module called Net::Gopher
( At many
areas throughout Net::Gopher, URLs are utilized;
parsed and manipulated using

My problem is that croaks with the fatal error
"Bad gopher type 'x'" if an item is denoted by an item
type character other than the 13 originally defined in
RFC 1436, even if it's a type in common usage (like
'h' for HTML, or 'M' for MIME files). While the
authors of RFC 1436 did enumerate 13 types, they
certainly did not intend for usage of the protocol be
limited to those types. See RFC 1436 pp. 10-11. Also,
this behavior prohibits usage of the additional item
types defined in Gopher+: Upward Compatible
Enhancements to the Internet Gopher Protocol.

The offending lines are in the _gopher_type() method

>           Carp::croak("Bad gopher type '$new_type'")
>               unless $new_type =~ /^[0-9+IgT]$/;

If you could remove them from the next distribution of
URI, I would greatly appreciate it.

Thank you.
  • Loading branch information...
1 parent 5123cd4 commit bdd19fc68204481afe3bc2f58a40df233f96a7a4 @gisle gisle committed Oct 4, 2003
Showing with 1 addition and 1 deletion.
  1. +1 −1 URI/
@@ -38,7 +38,7 @@ sub _gopher_type
my $new_type = shift;
if (defined($new_type)) {
Carp::croak("Bad gopher type '$new_type'")
- unless $new_type =~ /^[0-9+IgT]$/;
+ unless length($new_type) == 1;
substr($path, 0, 0) = $new_type;
} else {

0 comments on commit bdd19fc

Please sign in to comment.