Bug #6386

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

Added by Zachary Scott almost 2 years ago. Updated 8 months ago.

[ruby-core:44779]
Status:Rejected
Priority:Normal
Assignee:akira yamada
Category:lib
Target version:2.1.0
ruby -v:- Backport:

Description

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

1: http://pastie.org/3845341

0001-test-uri-test_generic-test_parse.patch Magnifier (572 Bytes) Zachary Scott, 05/02/2012 06:29 AM


Related issues

Duplicated by ruby-trunk - Bug #6983: URI:HTTP accepts invalid uri Rejected 09/06/2012

History

#1 Updated by Eric Hodel almost 2 years ago

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

Switched to URI maintainer

#2 Updated by Zachary Scott almost 2 years ago

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

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

#3 Updated by Ayumu AIZAWA almost 2 years ago

  • Status changed from Open to Assigned

#4 Updated by Yusuke Endoh about 1 year 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 mame@tsg.ne.jp

#5 Updated by Yui NARUSE 8 months 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