Feature Request
To add the ability to custom Cookie management for HttpClient Path Validation. To achieve this Titanium could allow to custom cookie policy and registering their own cookie support.
Rationale
When the server is setting a cookie with an invalid path and HttpClient is properly rejecting the cookie. According to the RFC spec, a server must set the cookie path using the URL path, or an ancestor path.
Use case
On Titanium abort a XHR tears down underlying TCP connection which forces client to accept cookies.
Stack Trace
06-13 16:18:22.125: W/ResponseProcessCookies(21195): Cookie rejected: "BasicClientCookie[version=0,name=ObFormLoginCookie,domain=sso.cisco.com,path=/autho/login/loginaction.html,expiry=null]". Illegal path attribute "/autho/login/loginaction.html". Path of origin: "/obrareq.cgi"
To avoid this Browsers can ignore the spec and just accept the cookie.
Additional details
For example, when accessing
http://foo.com/a/b/, the server may set a cookie with path /a/b/, /a, or /, but not /a/c. But since most all browsers (I only checked Firefox) ignore the spec and accept the cookie, I need HttpClient to do the same.
Similar discussion:
http://highaltitudedev.blogspot.mx/2011/03/httpclient-cookie-path-validation.html
master PR: https://github.com/appcelerator/titanium_mobile/pull/4549
This feature is not necessary for the customer since what the customer wants is to fix TIMOB-14224.
Closing ticket as duplicate.