Project

General

Profile

Bug #6983

URI:HTTP accepts invalid uri

Added by zbskii (Brett Carter) over 7 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Normal
Target version:
-
ruby -v:
1.9.3
Backport:
[ruby-core:47439]

Description

URI.parse will parse 'http:/foo.com' as a valid HTTP uri, even though it's missing a / between the scheme and authority.


Related issues

Is duplicate of Ruby master - Bug #6386: URI.parse should raise an error for invalid uri 'http:/'Rejected05/02/2012akira (akira yamada)Actions

Updated by ayumin (Ayumu AIZAWA) over 7 years ago

  • Assignee set to akira (akira yamada)

Updated by ayumin (Ayumu AIZAWA) over 7 years ago

  • Status changed from Open to Assigned
#3

Updated by naruse (Yui NARUSE) over 6 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 / ":" / "@"

Also available in: Atom PDF