Skip to content

Implement proper cookie reuse in TFPHTTPClient

Current implementation simply reads every Set-Cookie line where even the attributes are considered as cookie also. It forms a flat TStrings where every entry is either a cookie or a cookie attribute.

During SendRequest, only the first entry is considerd a cookie, the rest is added as attributes no matter how many Set-Cookie were in the response of previous request.

This commit tries to fix that by properly reading the cookie separated from the attributes by utilizing TStrings' name-value capability.

In SendRequest, each cookie will be sent back on its own line without the attributes, as how it should be.

This commit does not handle the attributes themselves, it can be read in raw form (semicolon separated) but that's it, no semantic handling at all.

Merge request reports

Loading