We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4f463a commit 9a7f4daCopy full SHA for 9a7f4da
lib/protocol/http/headers.rb
@@ -413,11 +413,7 @@ def delete(key)
413
if current_value = hash[key]
414
current_value << value
415
else
416
- if policy.respond_to?(:parse)
417
- hash[key] = policy.parse(value)
418
- else
419
- hash[key] = policy.new(value)
420
- end
+ hash[key] = policy.parse(value)
421
end
422
423
# By default, headers are not allowed in trailers:
test/protocol/http/headers.rb
@@ -384,6 +384,10 @@
384
# Create a custom header class that allows trailers
385
let(:grpc_status_class) do
386
Class.new(String) do
387
+ def self.parse(value)
388
+ new(value)
389
+ end
390
+
391
def self.trailer?
392
true
393
0 commit comments