#7 √ resolved
Phrogz

Can't URL single-machine-name URLs

Reported by Phrogz | August 27th, 2007 @ 09:41 AM

I tried to create a RubyURL for:

http://blackfish/

and it said:

OH NOEZ! UR LYNKZ IZ BROKEN

This is a machine name that resolves on my internal network; obviously this wouldn't work for the general public, but it is useful for a small subset of people.

Comments and changes to this ticket

  • Chris Griffin

    Chris Griffin August 27th, 2007 @ 11:25 AM

    • → Assigned user changed from “” to “Robby Russell”
    • → State changed from “new” to “open”

    Just out of curiosity: What would be be the benefit of using RubyURL in this situation?

    I ask not because I'm trying to discourage this. I'm just wondering because it seems http://blackfish/ is shorter than a rubyurl. You couldn't just hand out http://blackfish/

    It would be great to know how people are using RubyURL other than just shortening URLs :)

  • Phrogz

    Phrogz August 27th, 2007 @ 11:40 AM

    The actual use case had a much longer URL that word wrapped, but was

    still on the same server.

    (- /\ \/ / /\/

    On Aug 27, 2007, at 12:25 PM, Lighthouse <support>

    wrote:

  • Robby Russell

    Robby Russell August 27th, 2007 @ 11:45 AM

    It's currently verifying that the domain follows the normal TLD pattern. Would a rubyurl be really helpful for this? I was planning on releasing the source, so you could ... in theory run rubyurl code and remove that filter and have http://url/21d or something...

  • Phrogz

    Phrogz August 27th, 2007 @ 12:20 PM

    This isn't a big deal, so feel free to fix it or not as you see fit.

    That said: what's the benefit of validating against some arbitrary

    pattern? Unless you're tracking statistics about domains (and hence

    need to parse them) isn't rubyurl just a (very useful) mapping from

    one string to another?

    As a tool to be used by web browsers you could either:

    a) attempt to strictly parse URIs per an RFC, matching known protocols

    and syntaxes, or

    b) attempt to strictly match every URI syntax allowed by any "major"

    browser (which may or may not match some RFC), or

    c) allow any string as input, and just let the web browser handle it

    when you spit it back to them.

    (- /\ \/ / /\/

    On Aug 27, 2007, at 12:45 PM, Lighthouse <support>

    wrote:

  • Robby Russell

    Robby Russell August 27th, 2007 @ 09:19 PM

    Phrogz,

    Okay, I'll do this, but we still need http(s):// in front of it so that redirections can properly happen. When lookin at my current regular expression, I saw that there could be issues with port numbers as well. Let's open this baby up!

  • Robby Russell

    Robby Russell August 27th, 2007 @ 09:32 PM

    • → State changed from “open” to “resolved”

    This has been changed and the site now accepts URLs like http://blackfish/.

  • Phrogz

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket