class Patron::Response

def parse_headers(header_data)

Called by the C code to parse and set the headers
def parse_headers(header_data)
  header_data.split(/\r\n/).each do |header|
    if header =~ %r|^HTTP/1.[01]|
      @status_line = header.strip
    else
      parts = header.split(':', 2)
      parts[1].strip! unless parts[1].nil?
      if @headers.has_key?(parts[0])
        @headers[parts[0]] << ",#{parts[1]}"
      else
        @headers[parts[0]] = parts[1]
      end
    end
  end
end