Project

General

Profile

Actions

Bug #6386

closed

URI.parse should raise an error for invalid uri 'http:/'

Added by zzak (zzak _) almost 12 years ago. Updated over 10 years ago.

Status:
Rejected
Target version:
ruby -v:
-
Backport:
[ruby-core:44779]

Description

I've added a test to cover this, or you can use the following workaround[1].

1: http://pastie.org/3845341


Files


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #6983: URI:HTTP accepts invalid uriRejectedakira (akira yamada)09/06/2012Actions

Updated by drbrain (Eric Hodel) almost 12 years ago

  • Assignee changed from drbrain (Eric Hodel) to akira (akira yamada)
  • ruby -v changed from 2.0.0 to -

Switched to URI maintainer

Updated by zzak (zzak _) almost 12 years ago

Here's a gist[1] of the same workaround, in case the pastie gets pruned.

1: https://gist.github.com/2571731

Updated by ayumin (Ayumu AIZAWA) almost 12 years ago

  • Status changed from Open to Assigned

Updated by mame (Yusuke Endoh) about 11 years ago

  • Subject changed from URI.parse should raise an error for invalid uri 'http:/' to URI.parse should raise an error for invalid uri 'http:/'
  • Target version changed from 2.0.0 to 2.1.0

The URI maintainer, akira, is inactive for a long time.
I think that he should be discharged.

http://bugs.ruby-lang.org/projects/ruby/wiki/MaintainerDischargingProcess

--
Yusuke Endoh

Updated by naruse (Yui NARUSE) over 10 years ago

  • Status changed from Assigned to Rejected

"http:/foo" is valid absolute-URI.

see http://tools.ietf.org/html/rfc3986

absolute-URI = scheme ":" hier-part [ "?" query ]

scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty

path-absolute = "/" [ segment-nz *( "/" segment ) ]

segment = pchar
segment-nz = 1
pchar

pchar = unreserved / pct-encoded / sub-delims / ":" / "@"

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0