From: merch-redmine@... Date: 2019-07-09T02:08:10+00:00 Subject: [ruby-core:93624] [Ruby master Bug#10507] URI Error: bad URI(is not URI?) in Ruby 2.0.0, 2.1.5, 2.2.0preview1 Issue #10507 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed This was fixed between 2.1 and 2.2: ``` $ ruby21 -ruri -e "p URI 'http://localhost:3000/?url=google.com&clipRect={"top":0,"left":0,"width":1050,"height":700}'" /usr/local/lib/ruby/2.1/uri/common.rb:176:in `split': bad URI(is not URI?): http://localhost:3000/?url=google.com&clipRect={top:0,left:0,width:1050,height:700} (URI::InvalidURIError) from /usr/local/lib/ruby/2.1/uri/common.rb:211:in `parse' from /usr/local/lib/ruby/2.1/uri/common.rb:747:in `parse' from /usr/local/lib/ruby/2.1/uri/common.rb:1232:in `URI' from -e:1:in `
' $ ruby22 -ruri -e "p URI 'http://localhost:3000/?url=google.com&clipRect={"top":0,"left":0,"width":1050,"height":700}'" # ``` ---------------------------------------- Bug #10507: URI Error: bad URI(is not URI?) in Ruby 2.0.0, 2.1.5, 2.2.0preview1 https://bugs.ruby-lang.org/issues/10507#change-79228 * Author: JuanitoFatas (Juanito Fatas) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: 2.1.5p273 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- This url is used to get a screenshot from a [web service](https://github.com/fzaninotto/screenshot-as-a-service) and specify the dimensions. ### Ruby 2.0.0p598 ``` ruby -v -ruri -e "URI 'http://localhost:3000/?url=google.com&clipRect={"top":0,"left":0,"width":1050,"height":700}'" ruby 2.0.0p598 (2014-11-13) [x86_64-darwin13.3.0] /Users/Juan/.rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?): http://localhost:3000/?url=google.com&clipRect={top:0,left:0,width:1050,height:700} (URI::InvalidURIError) from /Users/Juan/.rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/uri/common.rb:211:in `parse' from /Users/Juan/.rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/uri/common.rb:747:in `parse' from /Users/Juan/.rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/uri/common.rb:996:in `URI' from -e:1:in `
' ``` ### Ruby 2.1.5p273 ``` $ ruby -v -ruri -e "URI 'http://localhost:3000/?url=google.com&clipRect={"top":0,"left":0,"width":1050,"height":700}'" ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin13.0] /Users/Juan/.rubies/ruby-2.1.5/lib/ruby/2.1.0/uri/common.rb:176:in `split': bad URI(is not URI?): http://localhost:3000/?url=google.com&clipRect={top:0,left:0,width:1050,height:700} (URI::InvalidURIError) from /Users/Juan/.rubies/ruby-2.1.5/lib/ruby/2.1.0/uri/common.rb:211:in `parse' from /Users/Juan/.rubies/ruby-2.1.5/lib/ruby/2.1.0/uri/common.rb:747:in `parse' from /Users/Juan/.rubies/ruby-2.1.5/lib/ruby/2.1.0/uri/common.rb:1232:in `URI' from -e:1:in `
' ``` ### Ruby 2.2.0preview1 ``` $ ruby -v -ruri -e "URI 'http://localhost:3000/?url=google.com&clipRect={"top":0,"left":0,"width":1050,"height":700}'" ruby 2.2.0preview1 (2014-09-17 trunk 47616) [x86_64-darwin13] /Users/Juan/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/uri/rfc3986_parser.rb:47:in `split': bad URI(is not URI?): http://localhost:3000/?url=google.com&clipRect={top:0,left:0,width:1050,height:700} (URI::InvalidURIError) from /Users/Juan/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/uri/rfc3986_parser.rb:53:in `parse' from /Users/Juan/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/uri/common.rb:226:in `parse' from /Users/Juan/.rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/uri/common.rb:713:in `URI' from -e:1:in `
' ``` Thank you! -- https://bugs.ruby-lang.org/ Unsubscribe: