# File lib/rev/http_client.rb, line 310
310:     def parse_response_header
311:       return false unless parse_header(@response_header)
312: 
313:       unless @response_header.http_status and @response_header.http_reason
314:         on_error "no HTTP response"
315:         @state = :invalid
316:         return false
317:       end
318: 
319:       on_response_header(@response_header)
320: 
321:       if @response_header.chunked_encoding?
322:         @state = :chunk_header
323:       else
324:         @state = :body
325:         @bytes_remaining = @response_header.content_length
326:       end
327:       
328:       true
329:     end