nagachika
359653658e
merge revision(s) 8d04260acd8b6fba98867acc1a7e786495813fa0,2fbd8dca18a102cb3ffc5e7e6235c09fd0d04ba3,4165ec91d87ff1fcb41e312d896bea8a678c9bab,4d21134f3f1645ae2042d836e750ad267ee1551f,70da92cdf7ac75e071353c4551419ad02c284497,ea321a654d4b4fd6d56a1cdd6e117c62075898ee,ae68a8df586e9f3b3211e9c174b7001e57ee6aee,af67ced3b0945e8ea67434f8e66ef1e602656438,e77c766b7ab17e801c5cfa881754c392f8c13f0b:
...
[ruby/net-http] turn on frozen strings for net/http/header
https://github.com/ruby/net-http/commit/a5203c9f92
---
lib/net/http/header.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[ruby/net-http] turn on frozen strings for net/http/generic_request
https://github.com/ruby/net-http/commit/b92ade088d
---
lib/net/http/generic_request.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[ruby/net-http] update net/http/response to be frozen string literal
https://github.com/ruby/net-http/commit/dc3b4a75ca
---
lib/net/http/response.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[ruby/net-http] freeze rest of lib
https://github.com/ruby/net-http/commit/455a74734a
---
lib/net/http.rb | 2 +-
lib/net/http/backward.rb | 2 +-
lib/net/http/exceptions.rb | 2 +-
lib/net/http/proxy_delta.rb | 2 +-
lib/net/http/request.rb | 2 +-
lib/net/http/requests.rb | 2 +-
lib/net/https.rb | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
[ruby/net-http] Fix on 2.7
https://github.com/ruby/net-http/commit/5194fd541e
---
lib/net/http.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[ruby/net-http] use +'' everywhere
https://github.com/ruby/net-http/commit/1077427152
---
lib/net/http/generic_request.rb | 4 ++--
lib/net/http/response.rb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
[ruby/net-http] Update lib/net/http/response.rb
@natematykiewicz's suggestion to avoid a string allocation
https://github.com/ruby/net-http/commit/925630f227
Co-authored-by: Nate Matykiewicz <[email protected] >
---
lib/net/http/response.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[ruby/net-http] Update lib/net/http.rb
@natematykiewicz's suggestion to avoid another string allocation
https://github.com/ruby/net-http/commit/4a22c42338
Co-authored-by: Nate Matykiewicz <[email protected] >
---
lib/net/http.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[ruby/net-http] No longer neccessary to call `String#freeze` on
string literals.
See #144
https://github.com/ruby/net-http/commit/5a986c13d3
---
lib/net/http.rb | 2 +-
lib/net/http/generic_request.rb | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
2023-12-16 10:48:39 +09:00
nagachika
affd2c0296
merge revision(s) 0300ea5a6c:
...
[ruby/net-http] Improve performance of HTTPHeader#content_type
In the existing implementation, `main_type` and `sub_type` would end up
being called multiple times potentially.
Instead of doing that, save the result so it can be re-used.
https://github.com/ruby/net-http/commit/179976f7ea
---
lib/net/http/header.rb | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
2023-12-16 10:48:39 +09:00
nagachika
9e4b0c4c3f
merge revision(s) 35aba09e7f0d6b643c6446f44acdec654519ca64,8c8645f57895d97f5f3da06759c10853ba705a22,8f678d61a597fc2871031d7a38698f3dd63d8c29,44b7fd8d4fa842523813195dfb7255ce33fdf9ca,308942920f4e200468673be03c646f0645a84263,401aa9ddd1091f5b517dce37cd002bc2c37f5ac1,8250b4679453c095eab2f60d9147ca2fe4da32c6,fe7d4eed2511ff64f263d9f29cbf0dcbd4c3a026,d92289f6330c57b0fe970a654dbf33314bfd6203,3ebc80314cf1ce727dcc2ba4192ff5265d348206,5a9e2f142d9debfb44d7d23f6821b810607d9d15,3e5a77f1ae73f4a6bf7b2b868be674ab8c714c7a,faa4c2279aa018a2bb9bc09107adf8a8fcf5fd3d,6db79aefec27035583c5b236d98425748b428c49,06195e76037b500eac219b58506e34f0d852b472,a641f6422c97a72640dc295f6b1b3ec2b9da739e,2c7fe9c0a6a2cea1243dcb30e684bf8c016f1192,bc6e587e86a4a4a46af3b1c2fbe1ff3b399735a6,3c7d5ccdce5707d7964f01f974db505d5add590f,847a0df058a4adb60266213cb8db7bb537c1d09e,a49bc73e1f33e8a0e40ff0c3fef6c6fe749f8179,899fad907c32b533bb73206d5e19204e526621ba,4edb2a29f67957fc7027eaad0c08e8003cfde609,7c47c2617a091e2a7abaeff329fdef47d1f3f3f5,05f016cdad84481c084543c6fa8b32205c19431f,6e6992e5db49a238baf290d9b9b521f6b6be5a19:
...
[ruby/net-http] Adding links to references
https://github.com/ruby/net-http/commit/b85530e6b8
---
lib/net/http/responses.rb | 206 ++++++++++++++++++++++++++++++++++++++++------
1 file changed, 180 insertions(+), 26 deletions(-)
[ruby/net-http] [DOC] Adding links to references
(https://github.com/ruby/net-http/pull/97 )
https://github.com/ruby/net-http/commit/768115167a
---
lib/net/http/responses.rb | 83 ++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 72 insertions(+), 11 deletions(-)
[ruby/net-http] Adding links to references
https://github.com/ruby/net-http/commit/1c8151aaf3
---
lib/net/http/responses.rb | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
[ruby/net-http] Enhanced RDoc for HTTPHeader
https://github.com/ruby/net-http/commit/6a282eccdd
---
lib/net/http/header.rb | 39 +++++++++++++++++++++++++++++----------
1 file changed, 29 insertions(+), 10 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for set_form
(https://github.com/ruby/net-http/pull/103 )
https://github.com/ruby/net-http/commit/f6506ff889
---
lib/net/http/header.rb | 152 +++++++++++++++++++++++++++++++++----------------
1 file changed, 102 insertions(+), 50 deletions(-)
[ruby/net-http] [DOC] Header doc
(https://github.com/ruby/net-http/pull/104 )
https://github.com/ruby/net-http/commit/3308362d9b
---
lib/net/http/header.rb | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
[ruby/net-http] Correct doc error
https://github.com/ruby/net-http/commit/dc006d8419
---
lib/net/http/response.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Manually merged https://github.com/ruby/net-http/pull/106
Co-authored-by: Peter Zhu <[email protected] >
Co-authored-by: BurdetteLamar <[email protected] >
---
lib/net/http.rb | 109 +++++++++++++++++++++++++++-----------------------------
1 file changed, 52 insertions(+), 57 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/110 )
https://github.com/ruby/net-http/commit/b098caa5e4
---
doc/net-http/examples.rdoc | 3 +-
lib/net/http.rb | 166 +++++++++++++++++++++------------------------
2 files changed, 78 insertions(+), 91 deletions(-)
[ruby/net-http] Redirection revision
https://github.com/ruby/net-http/commit/9a4e2d3a2a
---
lib/net/http.rb | 62 ++++++++++++++++++++++++++++-----------------------------
1 file changed, 30 insertions(+), 32 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for HTTPGenericRequest
(https://github.com/ruby/net-http/pull/113 )
https://github.com/ruby/net-http/commit/14c8405702
---
lib/net/http/generic_request.rb | 92 +++++++++++++++++++++++++++++++++++++----
1 file changed, 84 insertions(+), 8 deletions(-)
[ruby/net-http] Remarks on inclusions
https://github.com/ruby/net-http/commit/dfd060c583
---
doc/net-http/included_getters.rdoc | 3 +
doc/net-http/included_setters.rdoc | 3 +
lib/net/http/requests.rb | 30 ++++++++++
lib/net/http/responses.rb | 120 +++++++++++++++++++++++++++++++++++++
4 files changed, 156 insertions(+)
create mode 100644 doc/net-http/included_getters.rdoc
create mode 100644 doc/net-http/included_setters.rdoc
[ruby/net-http] [DOC] Enhanced RDoc for write_timeout
(https://github.com/ruby/net-http/pull/115 )
https://github.com/ruby/net-http/commit/6da39b0461
---
lib/net/http.rb | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/116 )
https://github.com/ruby/net-http/commit/22c0d34002
---
lib/net/http.rb | 78 +++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 59 insertions(+), 19 deletions(-)
* remove trailing spaces. [ci skip]
---
lib/net/http.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[ruby/net-http] [DOC] Reorganize doc for proxy server
(https://github.com/ruby/net-http/pull/117 )
https://github.com/ruby/net-http/commit/f8b6b76cba
---
lib/net/http.rb | 198 ++++++++++++++++++++++++++++----------------------------
1 file changed, 100 insertions(+), 98 deletions(-)
[ruby/net-http] Enhanced RDoc for Net::HTTP
https://github.com/ruby/net-http/commit/e65a3d9f11
---
lib/net/http.rb | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
[ruby/net-http] Enhanced RDoc for Compression
https://github.com/ruby/net-http/commit/cff88acd70
---
lib/net/http.rb | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for request headers
(https://github.com/ruby/net-http/pull/120 )
https://github.com/ruby/net-http/commit/b4eb8a7932
---
doc/net-http/included_setters.rdoc | 3 ---
lib/net/http/request.rb | 53 +++++++++++++++++++++++++++++++++++---
lib/net/http/requests.rb | 30 ++++++++++-----------
3 files changed, 64 insertions(+), 22 deletions(-)
delete mode 100644 doc/net-http/included_setters.rdoc
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP#get
(https://github.com/ruby/net-http/pull/121 )
https://github.com/ruby/net-http/commit/51b9af1eed
---
lib/net/http.rb | 53 +++++++++++++++++++++++------------------------------
1 file changed, 23 insertions(+), 30 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/122 )
https://github.com/ruby/net-http/commit/06f79cda87
---
lib/net/http.rb | 91 ++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 57 insertions(+), 34 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/123 )
https://github.com/ruby/net-http/commit/220ff3f741
---
lib/net/http.rb | 118 +++++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 96 insertions(+), 22 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net:HTTP
(https://github.com/ruby/net-http/pull/124 )
https://github.com/ruby/net-http/commit/aaf26b21d6
---
lib/net/http.rb | 35 ++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/125 )
https://github.com/ruby/net-http/commit/2ea20380fc
---
lib/net/http.rb | 130 +++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 87 insertions(+), 43 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/126 )
https://github.com/ruby/net-http/commit/4700d0660b
---
lib/net/http.rb | 87 +++++++++++++++++++++++++++++++-------------------
lib/net/http/status.rb | 2 +-
2 files changed, 55 insertions(+), 34 deletions(-)
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/127 )
https://github.com/ruby/net-http/commit/07b2b88ef5
---
lib/net/http.rb | 65 +++++++++++++++++++++++++++++++--------------------------
1 file changed, 35 insertions(+), 30 deletions(-)
2023-12-16 10:48:39 +09:00
nagachika
f1097813a3
merge revision(s) d8b8294c28a09278de357c26b291abf1b9f3cc5d,eedcd696a57521a18963d58487db8057a374a67a,bc0a7a641b6d0d3ff979cfa11e25683f8fa59ebd:
...
[ruby/net-http] Limit header length
https://github.com/ruby/net-http/commit/c245f7f9c8
---
lib/net/http/header.rb | 8 ++++++++
1 file changed, 8 insertions(+)
[ruby/net-http] Fix previous commit
https://github.com/ruby/net-http/commit/1b276e2654
---
lib/net/http/header.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[ruby/net-http] typofix
https://github.com/ruby/net-http/commit/4d31bde125
---
lib/net/http/header.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
2023-12-09 16:50:08 +09:00
Burdette Lamar and git
d2b87456f0
[ruby/net-http] [DOC] Correct formatting in header.rb
...
(https://github.com/ruby/net-http/pull/90 )
https://github.com/ruby/net-http/commit/d9d829ca53
2022-12-14 21:34:12 +00:00
Burdette Lamar and git
63f682ba11
[ruby/net-http] [DOC] Enhanced RDoc for HTTPHeader
...
(https://github.com/ruby/net-http/pull/88 )
https://github.com/ruby/net-http/commit/46e966be10
2022-12-12 19:34:21 +00:00
Burdette Lamar and git
171e94bd95
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPHeader
...
(https://github.com/ruby/net-http/pull/83 )
https://github.com/ruby/net-http/commit/1ea5004098
2022-12-01 23:17:47 +00:00
Burdette Lamar and git
ee49fe5d34
[ruby/net-http] Enhanced RDoc for header Range
...
(https://github.com/ruby/net-http/pull/82 )
https://github.com/ruby/net-http/commit/a26f62a2e5
2022-11-28 23:33:15 +00:00
Burdette Lamar and git
b55da1cd97
[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPHeader
...
https://github.com/ruby/net-http/commit/77c6878970
2022-11-27 00:21:49 +00:00
BurdetteLamar and git
5ee947314e
[ruby/net-http] Enhanced RDoc for Net::HTTPHeader
...
https://github.com/ruby/net-http/commit/86b0514239
2022-11-23 17:12:35 +00:00
BurdetteLamar and git
4b32ed6e33
[ruby/net-http] Enhanced RDoc for Net::HTTPHeader
...
https://github.com/ruby/net-http/commit/ef0ef53b0c
2022-11-23 17:12:34 +00:00
BurdetteLamar and git
79a9280aa5
[ruby/net-http] Enhanced RDoc for Net::HTTPHeader
...
https://github.com/ruby/net-http/commit/0af9fb94a9
2022-11-23 17:12:33 +00:00
BurdetteLamar and git
c6dc126641
[ruby/net-http] Enhanced RDoc for Net::HTTPHeader
...
https://github.com/ruby/net-http/commit/995ff356b4
2022-11-23 17:12:33 +00:00
BurdetteLamar and git
66be0922b7
[ruby/net-http] Enhanced RDoc for Net::HTTPHeader
...
https://github.com/ruby/net-http/commit/e924f1205b
2022-11-23 17:12:32 +00:00
c310691dd8
[ruby/net-http] Make Net::HTTPHeader#content_range return nil on non-byte units
...
* Returning nil from the `content_range` method instead of raising an
error when the unit in the content-range header is not "bytes".
Fix https://bugs.ruby-lang.org/issues/11450
https://github.com/ruby/net-http/commit/0b5030dd86
Co-Authored-By: Nobuyoshi Nakada <[email protected] >
2022-06-16 23:35:27 +09:00
Nobuyoshi Nakada
2223eb082a
Revert "HTTPHeader.content_range throws error on non-byte units"
...
This reverts commit 63546bfc15 .
2022-06-16 22:10:59 +09:00
Shishir Joshi and GitHub
63546bfc15
HTTPHeader.content_range throws error on non-byte units
...
* Added a nil check in Net::HTTPHeader#initialize_http_header for keys in the header that do not have any value
* Returning nil from the content_range method instead of raising an error when the unit in the content-range header is not bytes
* Modified initialize_http_header to match trunk
fix [Bug #11450 ]
fix https://github.com/ruby/ruby/pull/1018
2022-06-16 20:16:47 +09:00
Jeremy Evans
fa380208fe
Improve documentation for Net::HTTPHeader#set_form [ci skip]
...
Fixes [Misc #16916 ]
2020-05-27 13:13:46 -07:00
ohbarye and Aaron Patterson
b1678338e5
Fix typo: duplicated the [skip-ci]
2019-08-09 16:23:49 -07:00
Nobuyoshi Nakada
c9826c20d2
Show the caller's location
...
* lib/net/http/header.rb: show the caller's location instead of
the current lines.
2019-07-24 00:26:28 +09:00
nobu
f6e800dab0
ReFix r663197
...
Stringify after downcase, to restrict arguments.
[Bug#15394]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 00:36:46 +00:00
nobu
0bdc2287bc
Fix r663197
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 00:05:53 +00:00
naruse
1bf066dcfa
Preserve HTTP header key as string [Bug #15394 ]
...
to prevent send Host header twice accidentally.
From: Sangyong Sim <[email protected] >
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 23:54:14 +00:00
marcandre
d93dcd2840
net/http: Improve net/http header error message.
...
Patch by Matt Larraz. [Fix GH-1849].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 17:12:04 +00:00
naruse
0078e40115
raise error if value contains CR/LF in iniheader of initialize_http_header
...
like r59693, initialize_http_header also should raise error. [Bug #14208 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 12:06:59 +00:00
shyouhei
f2a91397fd
Add uplevel keyword to Kernel#warn and use it
...
If uplevel keyword is given, the warning message is prepended
with caller file and line information and the string "warning: ".
The use of the uplevel keyword makes Kernel#warn format output
similar to how rb_warn formats output.
This patch modifies net/ftp and net/imap to use Kernel#warn
instead of $stderr.puts or $stderr.printf, since they are used
for printing warnings.
This makes lib/cgi/core and tempfile use $stderr.puts instead of
warn for debug logging, since they are used for debug printing
and not for warning.
This does not modify bundler, rubygems, or rdoc, as those are
maintained outside of ruby and probably wish to remain backwards
compatible with older ruby versions.
rb_warn_m code is originally from nobu, but I've changed it
so that it only includes the path and lineno from uplevel
(not the method), and also prepends the string "warning: ",
to make it more similar to rb_warn.
From: Jeremy Evans [email protected]
Signed-off-by: Urabe Shyouhei [email protected]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 11:56:25 +00:00
hsbt
6693e3e723
Fixed misspelling words.
...
These are detected by https://github.com/client9/misspell
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-22 11:27:06 +00:00
naruse
56f91c6ec5
HTTPHeader#add_field should allow binary [Bug #13926 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-25 14:28:53 +00:00
ko1
7e8cdaa6c3
to_str -> to_s
...
* lib/net/http/header.rb (set_field): `val` can not have `to_str`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-30 22:23:45 +00:00
naruse
427f5b5713
A HTTP Header value must not contain CR or LF.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-30 17:24:05 +00:00
hsbt
6f6ed7fbba
* lib/net/http/header.rb: Fix typo. [ci skip][fix GH-1407]
...
* transcode.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16 02:18:51 +00:00
ktsj
02377a3a79
* lib/net/http/header.rb: [DOC] add documentation that
...
Net::HTTPHeader#{each_header,each_name,each_capitalized_name,
each_value,each_capitalized} without block returns an enumerator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-04 09:46:48 +00:00
ktsj
6da2214119
* lib/net/http/header.rb (Net::HTTPHeader#{each_header,each_name,
...
each_capitalized_name,each_value,each_capitalized}): Return
sized enumerators.
* test/net/http/test_httpheader.rb: add test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-04 09:46:46 +00:00
nobu
e83922a3ce
net/http/header.rb: refactor
...
* lib/net/http/header.rb (connection_close?): match headers
without making intermediate arrays.
* lib/net/http/header.rb (connection_keep_alive?): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-25 07:56:07 +00:00
hsbt
809d3770e6
* lib/net/http/header.rb: Warn nil variable on HTTP Header.
...
It caused to NoMethodError. [fix GH-952][fix GH-641] Patch by @teosz
* test/net/http/test_httpheader.rb: Added test for nil HTTP Header.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29 01:46:02 +00:00
normal
778bbac8ac
stdlib: avoid extra calls to eliminate "\n" from Base64
...
We may use the '0' (zero) to avoid adding the line feed.
Furthermore, the '*' (asterisk) modifier is not needed for
a single-element arrays.
* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String):
eliminate chomp
* lib/net/http.rb (connect): eliminate delete
* lib/net/http/header.rb (basic_encode): ditto
* lib/net/imap.rb (authenticate): eliminate gsub
(self.encode_utf7): shorten delete arg
* lib/net/smtp.rb (base64_encode): eliminate gsub
* lib/open-uri.rb (OpenURI.open_http): eliminate delete
* lib/rss/rss.rb: ditto
* lib/securerandom.rb (base64): ditto
(urlsafe_base64): eliminate delete!
* lib/webrick/httpauth/digestauth.rb (split_param_value):
eliminate chop
* lib/webrick/httpproxy.rb (do_CONNECT): eliminate delete
(setup_upstream_proxy_authentication): ditto
[ruby-core:72666] [Feature #11938 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-10 00:35:43 +00:00
a_matsuda
3a05da1321
[DOC] Fix typos
...
* benchmark.rb
* getoptlong.rb
* irb.rb
* net/http.rb
* net/http/header.rb
* net/imap.rb
* optparse.rb
* pstore.rb
* webrick.rb
* xmlrpc.rb
[ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23 03:43:23 +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
hsbt
1a98f56ae1
* lib/net/http/header.rb: pass header names as symbols.
...
Patch by @DamirSvrtan [fix GH-805]
* test/net/http/test_httpheader.rb: added test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 11:09:44 +00:00
hsbt
5728783a04
* lib/net/http/header.rb: [DOC] Net::HTTP#to_hash returns pair of key and array values. Thanks @bjhaid [fix GH-467]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 10:33:16 +00:00
nobu
0be97c7015
range.c: revert r42400
...
* range.c (range_last): revert r42400. [Bug #8739 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08 01:27:19 +00:00
nobu
e667aaf4ca
net/http/header.rb: remove a hack
...
* lib/net/http/header.rb (Net::HTTPHeader#set_range): remove a hack
for the bug fixed at [Bug #8739 ].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 12:38:51 +00:00
naruse
3ba0abdb15
* lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser of
...
HTTP Range request. Old one can't parse invalid specs and multiple
specs correctly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 13:09:26 +00:00
drbrain
510bbe015d
* lib/net/http.rb: Broke up Net::HTTP into individual files.
...
[ruby-trunk - Feature #6435 ]
* lib/net/http/backward.rb: ditto.
* lib/net/http/response.rb: ditto.
* lib/net/http/exceptions.rb: ditto.
* lib/net/http/responses.rb: ditto.
* lib/net/http/generic_request.rb: ditto.
* lib/net/http/header.rb: ditto.
* lib/net/http/request.rb: ditto.
* lib/net/http/proxy_delta.rb: ditto.
* lib/net/http/requests.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22 20:36:21 +00:00