Joe Rafaniello
25252677f9
[ruby/uri] Fix minor typo from
...
9997c1acee
c191b627cb
2024-11-11 02:42:53 +00:00
Hiroshi SHIBATA
04ca75ea69
[ruby/uri] Also warn URI::RFC3986_PARSER.extract
...
0f6b945557
2024-08-27 02:39:52 +00:00
Hiroshi SHIBATA
b41d79962a
Reapply "[ruby/uri] Warn compatibility methods in RFC3986_PARSER"
...
This reverts commit 3da7e440e9
.
2024-08-21 14:52:29 +09:00
Hiroshi SHIBATA
3da7e440e9
Revert "[ruby/uri] Warn compatibility methods in RFC3986_PARSER"
...
This reverts commit c3becc3ba6
.
2024-08-08 12:04:00 +08:00
Hiroshi SHIBATA
c3becc3ba6
[ruby/uri] Warn compatibility methods in RFC3986_PARSER
...
9997c1acee
2024-08-08 02:09:27 +00:00
Josh Soref
9d86864a6d
[ruby/uri] Add space after bad URI
...
9f2c7ed5f2
2024-08-05 08:15:56 +00:00
Hiroshi SHIBATA
2a56c1841d
[ruby/uri] URI.extract needs to pass block
...
If given block to URI.extract, it returns nil.
984145c407
2024-07-19 00:50:37 +00:00
Hiroshi SHIBATA
6452cf5cb5
[ruby/uri] Added compatibility methods for RFC2396 parser
...
bbb8a40eae
2024-07-19 00:50:36 +00:00
Nobuyoshi Nakada
995ce947be
[ruby/uri] Fix quadratic backtracking on invalid port number
...
https://hackerone.com/reports/1958260
9d7bcef1e6
2023-06-29 01:07:52 +00:00
Nobuyoshi Nakada
8307627245
[ruby/uri] String literals are frozen now
...
0b6ad60af6
2023-06-25 15:45:32 +00:00
Nobuyoshi Nakada
c21436cb35
[ruby/uri] Fix host part in relative referece #83
...
In relative referece, host part can be ommitted but can not be empty.
2980f0ba02
2023-06-25 15:24:05 +00:00
Nobuyoshi Nakada
6d734a8975
[ruby/uri] Fix RFC3986 regexps
...
8e38592241
2023-06-13 05:57:17 +00:00
Nobuyoshi Nakada
57c5b0a980
[ruby/uri] Refactor RFC3986 regexps to make more readable
...
3dfa19e920
2023-06-13 03:25:45 +00:00
Nobuyoshi Nakada
23f4904f4e
[ruby/uri] Fix quadratic backtracking on invalid URI
...
https://hackerone.com/reports/1444501
2f9585de17
2023-03-28 02:12:22 +00:00
Nobuyoshi Nakada
4b1504ae0a
[ruby/uri] Fix splitting relative URI
...
ffbab83de6
2022-10-13 16:24:53 +09:00
NARUSE, Yui
dd5118f852
URI.parse should set empty string in host instead of nil
2022-10-13 11:04:06 +09:00
Jeremy Evans
10ad81eb2d
[ruby/uri] Only use UnboundMethod#bind_call if it is available
...
This allows tests to pass on Ruby 2.4-2.6.
Fixes #19
67ca99ca87
2021-04-22 14:54:47 +09:00
Samuel Williams
844ff7ea45
[ruby/uri] Simplify construction of URI instances using parser interface.
...
c145017dd7
2020-03-26 18:06:14 +09:00
Kazuhiro NISHIYAMA
d6c80876b7
Use bind_call
instead of bind
and call
2019-10-11 13:50:27 +09:00
tenderlove
684cdb4f83
Escape debug output in InvalidURIError exceptions.
...
Co-authored-by: Brad Landers <brad@bradlanders.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-27 17:19:43 +00:00
naruse
3e92b635fb
Add frozen_string_literal: false for all files
...
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-16 05:07:31 +00:00
normal
aa93c62e3c
lib/uri: performance improvements [misc #10628 ]
...
* 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-24 23:50:37 +00:00
naruse
21ab98a997
* lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):
...
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-11-03 00:33:47 +00:00
glass
a4645e5612
* lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError when
...
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-27 03:13:22 +00:00
naruse
e37aab94da
* lib/uri/rfc3986_parser.rb: specify a regexp for :OPAQUE; generic.rb
...
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-09-17 14:15:03 +00:00
naruse
48559765b1
remove useless part of regexp
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30 10:06:25 +00:00
naruse
e02eb253e7
* lib/uri/generic.rb (check_port): allow strings for port= as
...
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-23 03:18:51 +00:00
naruse
b757ff3ef6
* lib/uri/rfc3986_parser.rb: raise exception when given a URI string has non 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-22 00:23:52 +00:00
naruse
bb83f32dc3
support RFC3986 [Feature #2542 ]
...
* 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-22 00:22:19 +00:00