Methods
Public Class
Public Instance
Constants
| VERSIONS | = | %w[1.0 1.1].freeze |
Attributes
| headers | [R] | |
| http_version | [R] | |
| status_code | [R] |
Public Class methods
new(observer)
[show source]
# File lib/httpx/parser/http1.rb 12 def initialize(observer) 13 @observer = observer 14 @state = :idle 15 @buffer = "".b 16 @headers = {} 17 @content_length = nil 18 @_has_trailers = @upgrade = false 19 end
Public Instance methods
<<(chunk)
[show source]
# File lib/httpx/parser/http1.rb 21 def <<(chunk) 22 @buffer << chunk 23 parse 24 end
reset!()
[show source]
# File lib/httpx/parser/http1.rb 26 def reset! 27 @state = :idle 28 @headers = {} 29 @content_length = nil 30 @_has_trailers = @upgrade = false 31 @buffer = @buffer.to_s 32 @buffer.clear 33 end
upgrade_data()
[show source]
# File lib/httpx/parser/http1.rb 39 def upgrade_data 40 @buffer.to_s 41 end