summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2023-03-30 21:41:03 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2023-03-30 21:41:03 +0900
commit23a532679b406cb53c0edfc00c91c32a5ccd335a (patch)
tree9b1f970cc9e0c6ea00f69bbc3f0d5a6e8a6c9550
parent4ec0bac2d9bd29541442709e6c2b62dee688c1ac (diff)
Fix previous commitv3_0_6
-rw-r--r--lib/net/http/header.rb4
-rw-r--r--version.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb
index 526f2713ee..495425d148 100644
--- a/lib/net/http/header.rb
+++ b/lib/net/http/header.rb
@@ -21,10 +21,10 @@ module Net::HTTPHeader
warn "net/http: nil HTTP header: #{key}", uplevel: 3 if $VERBOSE
else
value = value.strip # raise error for invalid byte sequences
- if key.bytesize > MAX_KEY_LENGTH
+ if key.to_s.bytesize > MAX_KEY_LENGTH
raise ArgumentError, "too long (#{key.bytesize} bytes) header: #{key[0, 30].inspect}..."
end
- if value.bytesize > MAX_FIELD_LENGTH
+ if value.to_s.bytesize > MAX_FIELD_LENGTH
raise ArgumentError, "header #{key} has too long field vallue: #{value.bytesize}"
end
if value.count("\r\n") > 0
diff --git a/version.h b/version.h
index 4148199b3a..ced217f204 100644
--- a/version.h
+++ b/version.h
@@ -12,7 +12,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 215
+#define RUBY_PATCHLEVEL 216
#define RUBY_RELEASE_YEAR 2023
#define RUBY_RELEASE_MONTH 3