It's in there. Scroll down to the bottom of the page.
I've been thinking about the Cookie Conundrum and I think it goes beyond just Cookies...
If I want to do a redirect on a page, as Dragonfly does with Response:redirect (something I use all the time) I have to set the headers to be a 302 Redirect. Again, these headers have to be sent before any other text is shown, so it has to be printed at the beginning.
I have changed the way Rockets works to use the Dragonfly model of just loading everything into a big global variable called STDOUT, then delaying printing until the end where you print the headers first and then STDOUT. Only I can't force the delay because there isn't a main program in charge of loading each page, so you have to remember to add the new function (display-page) at the end of your pages for it to work.
Hmm. Not sure about this. I'll think about it some more.
In order to get separate users to sign on and post messages, I need to set some cookies. This leads me to what I call a Cookie Conundrum.
I can define a function to set cookies that is executed somewhere in the page (like rockets-main.lsp) But cookies are set in the header, using the line Set-Cookie. The header is the first thing printed out by the script, and I won't know what the cookie is until later in the script.
What Dragonfly does is caches everything being (print)ed and (println)ed into a big old global variable called STDOUT. Then at the very end of the script it prints the headers (which have already been calculated by the script) followed by STOUT. This involves overriding (changing the default behavior) of (print) and (println). I could do that, but is there a way to do it differently? Can you set a cookie and somehow have it remember to print that cookie in the next header on the following page?
It's something to think about...
Said Han Solo.
No, I'm totally going to add that stuff. Very cool.
There's no millisecond thingy to say how fast this or how many resources were used in its making.Comments (1)
you see, that's why I can't be left alone with a programming language, I don't know shit.
Since we all live as RocketMan - numbies will be my sig
That service would be provided by your web browser... :)
Well, tried to just enter something in the top box and got sent away but now I am back about to make a non historical supporting post. There's spell check in here too?
How cool is that?
This, apparently, being the first thing that gets asked.
Well, it's not much, but it's here:
What happens if someone puts in a URL? The framework should translate the special characters, but it is the blog software itself that should translate it into a clickable link.
Of course, that doesn't mean I can't make a function to turn URLs into links automatically (and do other post-entry formatting of blog post text) and include it in Rockets...