lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV Cookie Support


From: Klaus Weide
Subject: Re: LYNX-DEV Cookie Support
Date: Fri, 18 Oct 1996 17:23:30 -0500 (CDT)

On Fri, 18 Oct 1996, Hiram Lester, Jr. wrote:

> On Thu, 17 Oct 1996, Klaus Weide wrote:
> 
> > Hmm, where would you store cookie information in memory?
> > The most obvious choice would be extending the HTParentAnchor structure
> > (see HTAnchor.[ch]).  Basically there is one HTParentAnchor object for
> > every URL that Lynx has ever seen in a session (not counting complications  
> > because of automatic memory cleanup and because HEAD and POST requests
> > use different instances for the same URL).  The anchor object gets passed
> > from getfile(LYGetFile.c) to HTLoadDocument to HTLoad(HTAccess.c) to
> > HTLoadHTTP(HTTP.c) to HTStreamStack which calls HTMIMEConverter(HTMIME.c)
> > to create a MIME parser...  there you could add Cookie specific
> > state information to the struct _HTStream, and access the
> > information in the anchor object and change it.
> 
> I figure it would have to be stored in a seperate structure.  The specs
> call for the following MINIMUM storage requirements:
> 
> 1. 300 Cookies
> 2. 4k per cookie
> 3. 20 cookies per site

Well I wasn't thinkin of actally reserving space for cookies in the 
HT{Parent,}Anchor structure, just some pointers to structures or buffers
that would be dynamically allocated "as usual".
 
> > I am not much familiar with cookies, but I think they are not really
> > on a per-URL (i.e. per-document) basis, but rather on a per-subtree/
> > per realm basis?  If that is the case, you may have to look into 
> > how the HTAA* access auth modules store that kind of information,
> > rather than just using the anchor object.
> 
> Correct.  If I had the following cookies:
> 
> COOKIE1=TRUE; Domain=.mtsu.edu; Path=/
> COOKIE2=TRUE; Domain=.mtsu.edu; Path=/foo/
> COOKIE3=1234; Domain=.cc.mtsu.edu; Path=/
> 
> For the following URL's:
> http://www.mtsu.edu/, cookie 1 would be sent
> http://www.mtsu.edu/foo/, cookies 1 and 2
> http://www.mtsu.edu/bar/, cookie 1
> http://www.mtsu.edu/foo/bar/, cookies 1 and 2
> http://acad1.mtsu.edu/, cookie 1
> http://www.cc.mtsu.edu/, cookies 1 and 3
> http://www.cc.mtsu.edu/foo/, all 3 cookies
> 
> It's a TAD bit more complicated than that, but not much... ;)
> 
> > I also think it might be easier to do this with wwwlib 5.0...
> 
> Probably so.  It may already have some of the structures built in,
> although it may not since the proposal is still in draft stages... :/

Well there is no "HTCookie module".  But you could have a look at the
"HTUTree module" - that may (or may not) be useful for managing the
information.  <URL: http://www.w3.org/pub/WWW/Library/src/> has the
sources online, you probably could use that module with Lynx, without
having to make too many changes.  But I am not sure whether it is
really useful, and there may already be something equivalent in some
part of the Lynx WWWlib code that I have so far avoided looking at.

  Klaus
just some
thoughts

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]