code: def from_headers (strheader):
      
      res = []
      fp = StringIO(strheader)
      headers = httplib.HTTPMessage(fp, seekable=True)
      if "Host" not in headers:
          raise ValueError("Required header 'Host:' missing")
      host = headers["Host"]
      path= headers.get("Path", "/")
      for header in headers.getallmatchingheaders("Set-Cookie"):
          headervalue = header.split(':', 1)[1]
          for pairs in cookielib.split_header_words([headervalue]):
              for name, value in pairs:
                  cookie = requests.cookies.create_cookie(name, value,
                      domain=host, path=path)
                  res.append(cookie)
      return res
docs: Parse cookie data from a string in HTTP header (RFC 2616) format.
  
      @return: list of cookies
      @raises: ValueError for incomplete or invalid data