Fixed header revision.
Fixed bug only free ptype if http_read_buffer_eof fails.