invernizzi / scapy-http

Support for HTTP in Scapy
Other
301 stars 77 forks source link

Multiple headers with the same name are lost. (Set-Cookie) #22

Open xlash opened 8 years ago

xlash commented 8 years ago

The following real world example contains multiple Set-Cookie HTTP headers in the response. Because the headers are a dict, it is not being matched correctly, and I'm losing one header.

HTTP/1.1 200 Success Cache-Control: private Content-Type: application/rpc Server: Microsoft-IIS/8.0 request-id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Set-Cookie: ClientId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; expires=Wed, 01-Mar-2017 15:30:59 GMT; path=/; HttpOnly X-CalculatedBETarget: servername X-AspNet-Version: 4.0.0 X-Powered-By: ASP.NET X-FEServer: servername Date: Tue, 01 Mar 2016 15:30:59 GMT Set-Cookie: obfuscated_cookie_name=longcookiename==; path=/ Transfer-Encoding: chunked