Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Passing a cookie back to the server

From: gjones05:mail:orion at: 9-Jun-2001 20:32

> From "Scott Jones" > > I really am interested in gettin feedback. > > Meahwhile, I will do more thinking and > > checking on the other things that would > > be nice tohave that I mentioned before.
From: "Graham Chiu"
> As you say, in the wild Internet, things get a little more > complicated. > > For instance, when you reach my site, I initially send a > session cookie to the browser. A session cookie is only > supposed to last the life of the browser session. When the > client browser logs in, eg: > > a: read/custom reduce [ 'cookie mycookie > 'post {userid=scott&password=etc} ]
Hey! How did you know my password! ;-)
> I then send another persistent cookie to the browser, and my > site now checks for 2 cookies. > > So, read/custom has to also catch all the new cookies coming > down the line. This is what I do in the htpp-tools.r
Wow, so it sounds like I have been reinventing the wheel. (Now, let's see, 2 x PI x R seems like a good guess, let me try that...). Several months ago I thought I had looked at all the most recent additions to the http arena. I guess your update came soon thereafter. Shame on me for not re-looking and asking! Well, that is only partially true. As I have mentioned elsewhere, I look for little projects that help me to improve my skills, and schemes are one of the areas in which I am trying to gain proficiency. After working on the ftp scheme and then the http scheme, I started thinking that a more generic solution was needed. It looks as though you (and the others) were way ahead of me in that arena. The main (and only) advantage I can think of with hacking the http scheme itself is that ssl, tls, tunneling, and encryption, etc, will be transparently supported. Do you think that this would be beneficial?
> So, maybe the syntax should be > > open/custom http://userid:[password--www--nabisco--com] reduce [ > 'cookie mycookie 'post data ]
It looks like it won't be too difficult to snag the return cookies even with a read (it sounds odd, but RT's schemes are really, really clever). I was looking at this section of the protocol for the specific purpose of allowing custom direct reads of large files (I was working on this with Petr K). The same section could snag the incoming cookie, ready for passing on the next read. Believe me, I am not trying to take away from your work (by the way, your code is always incredibly easy to read, which is a Good Thing, which is a compliment in case it was not obvious). As odd as it sounds, I am not a cookie kind of person, but I, too, need them for certain sites, and it would be nice if REBOL handled them more transparently. I mainly am doing this as a way to improve my skills. I am very glad to know of your improvements to our cookie mainstay by Andrew Grossman, and the addition of Martin Johannesson's POST script. It will be nice to recommend a more tried and true script. It will leave me to do my Frankenstein hacks in total safety!!! Now, back to what I was doing. let's see, the area of one surface of a cookie is PI x R x R, and if the chocolate chips are even distributed ..... Thanks for the info and enjoy what's left of your Sunday! --Scott Jones