Previously WriteRequest attempted to add cookies to the httpRequest
instance even if an error happened and might have resulted in
httpRequest being nil which in turn caused a crash.
This patch moves the error handling before looping through the current
cookies to avoid this crash from happening.
Previously WriteRequest attempted to add cookies to the httpRequest instance even if an error happened and might have resulted in httpRequest being nil which in turn caused a crash. This patch moves the error handling before looping through the current cookies to avoid this crash from happening.
Signed-off-by: Vinzenz Feenstra evilissimo@gmail.com