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: 8-Jun-2001 17:44

From: "Graham Chiu"
> "GS Jones" <[gjones05--mail--orion--org]> wrote: > > > > then, use the cookie like so... > > > > page: read reduce ['cookie mold > > my-cookie] > > Hi Scott, > > What's the syntax for read/custom ie. posting data as well > as sending a cookie?
Hi, Graham, Your question has spurred two issues. First, as you may have already noticed, I *forgot* to put the custom refinement in the above instruction ("If I only had a brain," Scarecrow - Wizard of Oz). Second, as I mentioned, the cookie has not tried with a post, and with your question, I suddenly realized that there may be a bug (there is an error in logic, but it may still work despite this oversite). I haven't had (taken) the time to find a site to try this out on yet. :-( The syntax is **supposed** to be like this: page: read/custom reduce [ 'cookie mold my-cookie 'post "data: 10" ] or this if no reduction/molding is needed (yuck, mold on the cookies;-): page: read/custom [ cookie my-cookie post "data: 10" ] Again, please don't spend a lot of time on it if it doesn't work easily. I should be able to get a much closer look at it this weekend and test it like it should have been before posting it to the list!! Do feel free to give me feedback, though. :-) And Petr Krenzelok wrote separartely:
> page: read/custom reduce ['post post-string]
yes, thanks for catching my oversite!!
> however, if for e.g. the request serves for download of big file, it will > eat your memory. Even using 'open will not help here. There seem to be no > simple way of partial readout from the port, simply to construct something > like while [data: copy/part my-opened-port buffer-size][insert > local-opened-file data] > > Or am I wrong? :-)
I was thinking early that maybe there is a way to include the following three things: 1) cookie management (getting/sending and otherwise) 2) port control for managing longer downloads 3) basic authorization The /custom refinement leaves some room for managing the transaction in a ... well ... custom way (hey, maybe they should call it /custom refinement ... oh, they did;-). I'm getting more comfortable poking around in the schemes, so maybe this weekend I can get some of this ironed out, and firm up the ideal syntax. (But I still need to finish my Command and Control Script written in the Prez dialect for replacing the space shuttle's Ada programs!!!! That is OK, right, Jeff K.? ;-) Sorry about the syntax oversite. --Scott Jones