Closed dtyoung closed 3 years ago
This is useful, looking forward to seeing this merged so I can remove my empty try catch that catches these formatexceptions.
I will take a look at it at weekend and provide a new version. Thanks for your contribution.
Hi @fryette. Have you had the time to take a look at this yet?
When calling getCookies(), all cookies for the provided url are serialised. There is a possibility that a cookie's value could contain invalid characters. If this is the case, a FormatException is thrown during the creation of the Cookie object, resulting in no cookies being serialised. This is particularly annoying if the desired result of calling getCookies() is to fetch information about a particular cookie.
This commit handles serialisation of cookies with invalid values by catching any cookies with invalid values and removing them from the returned list of cookies.