Closed Bug 326174 Opened 19 years ago Closed 8 years ago

nsICookieService should provide getCookie, a method that returns a nsICookie

Categories

(Core :: Networking: Cookies, enhancement)

All
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jason.barnabe, Unassigned)

References

Details

nsICookieService provides, among other things, getCookieString and getCookieStringFromHttp. They provide a cookie string that has to be parsed to be useful. This interface would be much more useful if it had methods that returned nsICookies.
have you looked at nsICookieManager/nsICookieManager2? please elaborate on why you think this is a good idea.
nsICookieManager makes you enumerate through every cookie to find what you want. nsICookieManager2 has nothing comparable.

It's a good idea because it would make that interface actually useful. If I want to read a cookie's value, right now I either have to enumerate through every cookie with nsICookieManager or get the cookie string and then implement cookie parsing logic. There's currently no interface that I know of to go from a cookie string to a nsICookie.

(It doesn't matter to me whether it goes in nsICookieManager or nsICookieService.)
What about nsICookieServiceInternal::getCookieValue?
Nevermind.  That API doesn't seem to do what you want either.
Assignee: darin → nobody
-> me, seems like a good idea.
Assignee: nobody → dwitte
this will be fixed by the patch in bug 423132.
Depends on: 423132
Reassigning to nobody. If anyone wants to work on this, feel free!
Assignee: dwitte → nobody
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.