summaryrefslogtreecommitdiff
path: root/lib/uri
AgeCommit message (Collapse)Author
2016-02-13CIDR in no_proxynobu
* lib/uri/generic.rb (URI::Generic#find_proxy): support CIDR in no_proxy. [ruby-core:73769] [Feature#12062] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13no_proxy with whitespaces and leading dotsnobu
* lib/uri/generic.rb (find_proxy): exclude white-spaces and allow for a leading dot in the domain name in no_proxy. [ruby-core:54542] [Feature #8317] The previous implementation wouldn't allow for white-spaces nor a leading dot in the domain name. The latter is described in the wget documentation as a valid case. By being more strict on the characters, which are counted to a domainname, we allow for white-spaces. Also, a possible leading dot will be handled gracefully. [Fix GH-285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-14* lib/uri/generic.rb (URI::Generic#to_s): change encoding tonaruse
UTF-8 as Ruby 2.2/ by Koichi ITO <koic.ito@gmail.com> https://github.com/ruby/ruby/pull/1188 fix GH-1188 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-15* lib/uri/common.rb: make code block for rdoc.hsbt
[ci skip][fix GH-1152] Patch by @Tonkpils git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-14* ext/socket/lib/socket.rb: use safe navigation operator.hsbt
[fix GH-1142] Patch by @mlarraz * lib/drb/extservm.rb: ditto. * lib/net/http.rb: ditto. * lib/net/http/response.rb: ditto. * lib/scanf.rb: ditto. * lib/uri/generic.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08lib/uri/generic.rb: enable frozen_string_literalnormal
* lib/uri/generic.rb: enable frozen_string_literal (split_userinfo): remove explicit .freeze for string literals (check_path): ditto (query): ditto (fragment): ditto (to_s): ditto [ruby-core:71910] [Bug #11759] Patch-by: Colin Kelley <colindkelley@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08* lib/uri/ftp.rb: fix a typo.hsbt
[fix GH-1084][ci skip] Patch by @windwiny git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-19* lib/uri/rfc2396_parser.rb (initialize_pattern):naruse
URI::Generic.build should accept port as a string. pattern[:PORT] is not defined for long. by Dave Slutzkin <daveslutzkin@fastmail.fm> https://github.com/ruby/ruby/pull/804 fix GH-804 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24* lib/uri: [doc] Update common.rb [ci-skip] [fixes GH-838]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14* lib/uri/mailto.rb: raising URI::InvalidComponentError insteadduerst
of failing with undefined method `split' for nil:NilClass for mailto: URIs without opaque part. [Bug #10738] * test/uri/testuri.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30lib/uri/common.rb: Initialize HTML5ASCIIINCOMPAT to empty Arrayduerst
to avoid error during bootstrap when encodings are not yet defined. [Bug #10678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24lib/uri: performance improvements [misc #10628]normal
* lib/uri/generic.rb (split_userinfo): fstring for 1-byte split (set_port): reduce bytecode size (check_path): reduce garbage via opt_str_freeze (query=): ditto (fragment=): ditto [misc #10628] * lib/uri/rfc3986_parser.rb (regexp): cache as attr (initialize): setup and freeze regexp attr once (split): reduce bytecode size, use opt_str_freeze (parse): minor bytecode and garbage reduction (default_regexp): rename for initialize git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23* lib/uri/generic.rb (URI::Generic#query=): don't escape [\]^naruse
on both rfc2396 and rfc3986. [Bug #10619] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01* lib/uri/generic.rb (URI::Generic.build):naruse
use hostname= to detect and wrap IPv6 hosts. Build is accepting URI components and users may not expect that a host component needs to be wrapped with square brackets since it's not providing a URI. Note: initialize with arg_check => true does not wrap IPv6 hosts. by Joe Rafaniello <jrafanie@redhat.com> https://github.com/ruby/ruby/pull/765 fix GH-765 * test/uri/test_generic.rb: Add more tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-20* lib/uri/mailto.rb (URI::MailTo::EMAIL_REGEXP): should escape `#`.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06lib/uri/rfc2396_parser.rb (initialize): reduce bytecode sizenormal
Reduce the initialize method from 2088 to 1332 bytes on 32-bit x86 Measurement obtained using `memsize_of_all', as `memsize_of' is non-recursive: a = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence) RubyVM::InstructionSequence.compile(src) b = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence) p(b - a) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03* lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):naruse
allow '[' and ']' for URI input (and escape). [Bug #10402] * lib/uri/generic.rb (URI#query=): escape '[', '\', and ']'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07* lib/uri/generic.rb (URI#inspect): remove Object id.naruse
URI is considered that it doesn't require id. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27* lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError whenglass
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150] * test/uri/test_parser.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-17* lib/uri/rfc3986_parser.rb: specify a regexp for :OPAQUE; generic.rbnaruse
assumes it is present, and will refuse all values otherwise. by Matthew Draper <matthew@trebex.net> https://github.com/ruby/ruby/pull/718 fix GH-718 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-27* lib/drb/acl.rb: Removed meaningless #to_s methods in interpolation.hsbt
[Feature #10174][ruby-core:64584] * lib/erb.rb: ditto. * lib/observer.rb: ditto. * lib/rake/invocation_chain.rb: ditto. * lib/rubygems/command_manager.rb: ditto. * lib/rubygems/config_file.rb: ditto. * lib/uri/common.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-25uri/common.rb: use negative look-aheadnobu
* lib/uri/common.rb (URI.decode_www_form_component): use negative look-ahead instead of nested repeat operators, to get rid of backtrack explosion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05remove path_querynaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05* lib/uri/generic.rb (URI::Generic#normalize!): use String#empty?naruse
* lib/uri/generic.rb (URI::Generic#path_query): optimized. * lib/uri/generic.rb (URI::Generic#to_s): optimized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05* lib/uri/http.rb (URI::HTTP#request_uri): optimized.naruse
decrease object allocation, and ensure always create at least one new object for return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-27* lib/uri/common.rb: [DOC] [Bug #9563] Recommend using URI.escapezzak
before parsing a uri to avoid invalid characters. Reported by Evgeniy Serykh. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-27* lib/uri/common.rb: [DOC] [Bug #10075] Clarify how URI.join argumentszzak
are handled by RFC3986, originall reported by John Feminella. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26* lib/shell/command-processor.rb: remove unused variable.hsbt
* lib/shell/system-command.rb: ditto. * lib/tmpdir.rb: ditto. * lib/uri/generic.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-03* lib/uri/generic.rb (URI::Generic#query=): remove validation, justnaruse
escape. [Feature #2542] * lib/uri/generic.rb (URI::Generic#fragment=): ditto. * lib/uri/generic.rb (URI::Generic#check_query): removed. * lib/uri/generic.rb (URI::Generic#set_query): ditto. * lib/uri/generic.rb (URI::Generic#check_fragment): ditto. * lib/uri/generic.rb (URI::Generic#set_fragment): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30suppress warnings: assigned but unused variablenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30remove useless part of regexpnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27* lib/uri/mailto.rb: update to latest specs, RFC 6068 and HTML5.naruse
* lib/uri/mailto.rb (HEADER_PATTERN): removed. * lib/uri/mailto.rb (HEADER_REGEXP): use RFC 6068 hfields. * lib/uri/mailto.rb (EMAIL_REGEXP): use HTML5 email regexp. * lib/uri/mailto.rb (URI::MailTo.build): support multiple to addresses. * lib/uri/mailto.rb (URI::MailTo#initialize): Support multiple to addresses. Don't check with regexp, only split. * lib/uri/mailto.rb (URI::MailTo#check_to): verify by matching URI path-rootless and HTML5 email regexp with unescaped one. * lib/uri/mailto.rb (URI::MailTo#check_headers): verify only by HEADER_REGEXP. * lib/uri/mailto.rb (URI::MailTo#set_headers): don't check by HEADER_REGEXP, only split it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-24Revert "* lib/uri/mailto.rb: support RFC6068."naruse
to fix mailto URI syntax git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23* lib/uri/mailto.rb: support RFC6068.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23* lib/uri/generic.rb (check_port): allow strings for port= asnaruse
described in rdoc. * lib/uri/rfc3986_parser.rb (regexp): implementation detail of above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22remove registrynaruse
'registry' is not used and RFC3986 doesn't use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22* lib/uri/rfc3986_parser.rb: raise exception when given a URI string has non ↵naruse
ASCII. It is to keep the regexp compiled for US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22support RFC3986 [Feature #2542]naruse
* lib/uri/common.rb (URI::REGEXP): move to lib/uri/rfc2396_parser.rb. * lib/uri/common.rb (URI::Parser): ditto. * lib/uri/common.rb (URI.split): use RFC3986_Parser. * lib/uri/common.rb (URI.parse): ditto. * lib/uri/common.rb (URI.join): ditto. * lib/uri/common.rb (URI.extract): deprecated. * lib/uri/common.rb (URI.regexp): ditto. * lib/uri/rfc2396_parser.rb: added. * lib/uri/rfc3986_parser.rb: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22lib/uri/mailto.rb (initialize): as previous commit, fix arg_checknaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22fix that arg_check didn't worknaruse
* lib/uri/ftp.rb (initialize): arg[-1] was fragment, but it must be arg_check. * lib/uri/ftp.rb (initialize): explicitly specify arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-21* lib/uri/common.rb: [DOC] Use static w3.org uri [ci skip]zzak
Patch by @ykzts [Fix GH-484] https://github.com/ruby/ruby/pull/484 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19* lib/cgi/html.rb: fix typo by @windwiny [fix GH-506]hsbt
* lib/net/http.rb: ditto * lib/rexml/attribute.rb: ditto * lib/rexml/element.rb: ditto * lib/rexml/source.rb: ditto * lib/rexml/streamlistener.rb: ditto * lib/rss/xmlparser.rb: ditto * lib/rubygems/commands/generate_index_command.rb: ditto * lib/shell.rb: ditto * lib/uri/common.rb:ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21* lib/uri/generic.rb: [DOC] Fix typoa_matsuda
s/andn/and/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 * lib/uri/common.rb: [DOC] Fix a broken link by @namusyaka [fix GH-478]hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29* lib/uri/generic.rb: [DOC] Fix typoa_matsuda
s/arguement/argument/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25* lib/uri/common.rb: [DOC] typo fixes by @vipulnsward [Fixes GH-456]zzak
https://github.com/ruby/ruby/pull/456 * lib/uri/generic.rb: [DOC] ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-13* lib/uri/generic.rb (URI::Generic.find_proxy): return nil ifnaruse
http_proxy environment variable is empty string. [ruby-core:57140] [Bug #8898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31* lib/uri/common.rb (URI.decode_www_form_component): Use String#b.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31* lib/uri/common.rb (URI.decode_www_form_component):sorah
Don't raise error when str includes multibyte characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e