Class: Protocol::HTTP::Header::Generic

Inherits:
Split
  • Object
show all
Defined in:
lib/protocol/http/header/generic.rb

Overview

Represents generic or custom headers that can be used in trailers.

This class is used as the default policy for headers not explicitly defined in the POLICY hash.

It allows generic headers to be used in HTTP trailers, which is important for:

  • Custom application headers.

  • gRPC status headers (grpc-status, grpc-message).

  • Headers used by proxies and middleware.

  • Future HTTP extensions.

Constant Summary

Constants inherited from Split

Split::COMMA

Class Method Summary collapse

Methods inherited from Split

#<<, coerce, #initialize, parse, #to_s

Constructor Details

This class inherits a constructor from Protocol::HTTP::Header::Split

Class Method Details

.trailer?Boolean

Whether this header is acceptable in HTTP trailers. Generic headers are allowed in trailers by default to support extensibility.

Returns:

  • (Boolean)


24
25
26
# File 'lib/protocol/http/header/generic.rb', line 24

def self.trailer?
  true
end