tink_http
tink_http copied to clipboard
Cookies
There is some duplication between this and some changes I made in the meantime. I will decide how to go about this after the WWX.
Do we have any updates on this one?
Yeah, sorry. So, uhm, as I said I implemented Set-Cookie too, which is here: https://github.com/haxetink/tink_http/blob/master/src/tink/http/Header.hx#L114 I can't say I'm overly happy with it (except the fact that httpOnly is the default). We definitely need to use some of your date formatting logic though (my version currently just throws an exception on JS because DateTools.format is not implemented) and solve the DST issue. The lack of plain UTC support in Haxe is quite frustrating, to be honest ... :S
Meanwhile, for parsing, one can simply use tink.url.Query.parseString(theCookie, ';'), which also handles trimming and urldecoding. Which reminds me though that tink_web should leverage that to just parse cookies.
thx.core supports UTC dates. But I am not sure what to do with DST.
Yeah. I've seen that, although it's kind of silly to add 15KLOC to get that. There's also DateTime, which is smaller, but still has around 4KLOC. I prefer to err on the side of leanness. Anyway, I'll solve this over the weekend, since I need it myself :D