From tschaef at sbcglobal.net Fri Jun 1 03:55:03 2007 From: tschaef at sbcglobal.net (timothy) Date: Thu, 31 May 2007 23:55:03 -0400 Subject: [hunchentoot-devel] Custom types for easy handler. In-Reply-To: References: <697843.97803.qm@web82304.mail.mud.yahoo.com> Message-ID: <1180670104.5775.27.camel@localhost.localdomain> Le mercredi 30 mai 2007 ? 09:35 +0200, Edi Weitz a ?crit : > Hi, > > sorry for the delay. > > On Fri, 25 May 2007 06:47:57 -0700 (PDT), Timothy Schaeffer wrote: > > > I propose that the types for easy-handlers be extensible by the > > users. I have pieces of markup which are used throughout our site > > which collect information from several fields into a class (in our > > case tied to a database with clsql). The names of the fields are > > related, but diffierent from the lists, arrays and hashes of the > > easy-handlers, Dates and addresses are two good examples, but there > > are others. I would like to be able to teach the easy handler to > > collect these for me and pass them as parameters. This cannot be > > done with functions as the :parameter-type because the functions > > passed as :parameter-type do not take the parameter name. > > I don't really understand what you're trying to do that can't be done > with REAL-NAME and a function designator for PARAMETER-TYPE. Maybe > you can provide an example? Voici a simple example of what I'm doing: (defun form-date-input (&key name (label "Date") value (required nil)) .... (with-html-output-to-string (s nil :indent t) ... a bunch of input fields for getting a date in pieces, whose id attr is based on the name paramater... )) ;; A function to collect date pieces from fields in markup produced ;; by form-date-input. parm-name must be the same as given in the ;; name parameter in form-date-input. (defun date-parameter (parm-name) (flet ((parm (item) (non-negative-integer-parameter ; guess what this does :) (conc parm-name "-date-" (string-downcase (to-string item)))))) (let ((yyyy (parm 'year)) (mm (parm 'month)) (dd (parm 'day))) (ignore-errors (clsql-sys::parse-datestring (format nil "~4,'0D-~2,'0D-~2,'0D" yyyy mm dd)))))) The function passed as :parameter-type takes only the parameter value as a string (right?), so I cannot do this there; I'm really collecting several fields into one value. > I'd say that if it can't be done, then your task is probably too > complicated for an "easy" handler, but maybe I'm missing something. > The idea of DEFINE-EASY-HANDLER is that it is a convenience macro for > 90% of the handlers one usually writes - the mundane ones. It was not > intended as a general purpose tool for every conceivable Hunchentoot > handler on Earth. Understood. I may have had a bit too much coffee. And some part of me doesn't like seeing a hardcoded list of types. Ars longa. Maybe I'll roll my own, define-hairy-wart-covered-handler maybe. I still think letting :request-type be a custom getter is a good idea though; it is an easy change and be consistent with the way :parameter-type works. > > Hunchentoot is a pleasure to work with! > That's good to know... :) It's good to be true [-) Tim S From gwking at metabang.com Sat Jun 2 12:38:29 2007 From: gwking at metabang.com (Gary King) Date: Sat, 2 Jun 2007 08:38:29 -0400 Subject: [hunchentoot-devel] patches for Hunchentoot / Flexistream for Allegro MoDeRn lisp Message-ID: Hi, I recently ran into a few minor glitches getting Hunchentoot to run under Allegro's Modern Common Lisp. Here are some patches (based on the darcs repos). The flexistream patch is the "important" one. The hunchentoot changes are just adding a declare ignore, fixing a typo in a docstring and rewiting some #+ #+ a b as #+ a #+ b (the former has a claim to elegance but the later is unambiguous and works regardless of the default settings in allegro). HTH, # Flexistreams diff -rN -u old-flexi-streams/packages.lisp new-flexi-streams/ packages.lisp --- old-flexi-streams/packages.lisp 2007-06-02 08:32:41.000000000 -0400 +++ new-flexi-streams/packages.lisp 2007-06-02 08:32:41.000000000 -0400 @@ -29,7 +29,7 @@ (in-package :cl-user) -(unless (find-symbol "STREAM-FILE-POSITION" :trivial-gray-streams) +(unless (find-symbol (symbol-name 'stream-file-position) :trivial- gray-streams) (error "You need a newer version of TRIVIAL-GRAY-STREAMS.")) (defpackage :flexi-streams # Hunchentoot diff -rN -u old-hunchentoot/server.lisp new-hunchentoot/server.lisp --- old-hunchentoot/server.lisp 2007-06-02 08:35:13.000000000 -0400 +++ new-hunchentoot/server.lisp 2007-06-02 08:35:13.000000000 -0400 @@ -159,6 +159,7 @@ but this works only on LispWorks - for other Lisps the key must not be associated with a password." ;; initialize the session secret if needed + (declare (ignorable port-provided-p)) (unless (boundp '*session-secret*) (reset-session-secret)) (let ((output-chunking-p t)) @@ -180,14 +181,20 @@ :dispatch-table dispatch-table :output-chunking-p (and output- chunking-p (not mod-lisp-p)) :input-chunking-p input-chunking-p - #-:hunchentoot-no-ssl #-:hunchentoot-no-ssl - :ssl-certificate-file (and ssl- certificate-file - (namestring ssl-certificate-file)) - #-:hunchentoot-no-ssl #-:hunchentoot-no-ssl - :ssl-privatekey-file (and ssl- privatekey-file - (namestring ssl-privatekey-file)) - #-:hunchentoot-no-ssl #-:hunchentoot-no-ssl - :ssl-privatekey-password ssl- privatekey-password + #-:hunchentoot-no-ssl + :ssl-certificate-file + #-:hunchentoot-no-ssl + (and ssl-certificate-file + (namestring ssl-certificate-file)) + #-:hunchentoot-no-ssl + :ssl-privatekey-file + #-:hunchentoot-no-ssl + (and ssl-privatekey-file + (namestring ssl-privatekey-file)) + #-:hunchentoot-no-ssl + :ssl-privatekey-password + #-:hunchentoot-no-ssl + ssl-privatekey-password :mod-lisp-p mod-lisp-p :use-apache-log-p (and mod-lisp-p use-apache-log-p) :read-timeout read-timeout diff -rN -u old-hunchentoot/test/test.lisp new-hunchentoot/test/ test.lisp --- old-hunchentoot/test/test.lisp 2007-06-02 08:35:13.000000000 -0400 +++ new-hunchentoot/test/test.lisp 2007-06-02 08:35:13.000000000 -0400 @@ -150,7 +150,7 @@ (log-message :info "Oops info") (log-message :debug "Oops debug") (error "An error was triggered on purpose. Check your ~ -Apache error log. Up to 12 messages where logged depending on ~ +Apache error log. Up to 12 messages were logged depending on ~ the Apache log level set in httpd.conf.") (:html (:body "You'll never see this sentence...")))) @@ -580,3 +580,4 @@ ("/hunchentoot/test/files/" send-file) ("/hunchentoot/test" menu))) (list #'default-dispatcher))) -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From achambers.home at googlemail.com Sat Jun 2 20:40:16 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Sat, 2 Jun 2007 21:40:16 +0100 Subject: [hunchentoot-devel] beginners output problem Message-ID: The send-reply function below is part of some code that transforms sexp's according to specified rules a-la-sxml from the scheme world. My problem is that when I evaluate the let form on its own, it returns "" as expected. However, when I request the page served by the easy-handler, I get the following condition. I/O timeout reading # I'm using sbcl on debian with hunchentoot just asdf-intalled as a local package. Can anyone suggest why the let form would evaluate ok on its own but not inside the easy-handler? Cheers, Andy (defun send-reply (&optional s &rest fragments) "Output the fragments to the specified stream" (labels ((descend (fragments &optional result) (cond ((null fragments) result) ((not (car fragments)) (descend (cdr fragments) result)) ((null (car fragments)) (descend (cdr fragments) result)) ((eq t (car fragments)) (descend (cdr fragments) t)) ((consp (car fragments)) (descend (cdr fragments) (descend (car fragments) result))) ((functionp (car fragments)) (funcall (car fragments)) (descend (cdr fragments) t)) (t (format s "~a" (car fragments)) (descend (cdr fragments) t))))) (descend fragments))) (define-easy-handler (test :uri "/test" :default-request-type :get) () (let ((out (with-output-to-string (s) (send-reply s '(#\< HTML (#\> ")))))) out)) From edi at agharta.de Sat Jun 2 22:07:45 2007 From: edi at agharta.de (Edi Weitz) Date: Sun, 03 Jun 2007 00:07:45 +0200 Subject: [hunchentoot-devel] patches for Hunchentoot / Flexistream for Allegro MoDeRn lisp In-Reply-To: (Gary King's message of "Sat, 2 Jun 2007 08:38:29 -0400") References: Message-ID: Hi, On Sat, 2 Jun 2007 08:38:29 -0400, Gary King wrote: > I recently ran into a few minor glitches getting Hunchentoot to run > under Allegro's Modern Common Lisp. Here are some patches (based on > the darcs repos). The patches are otherwise fine with me, but please send them without Tab characters and not against the (unofficial) Darcs repositories but against the latest releases. I'd also prefer separate patches for the two different projects so that I can simply apply them and don't have to sort them out manually. See also http://weitz.de/patches.html > The hunchentoot changes are just adding a declare ignore, fixing a > typo in a docstring and rewiting some #+ #+ a b as #+ a #+ b (the > former has a claim to elegance but the later is unambiguous and > works regardless of the default settings in allegro). If the former doesn't work, isn't that a bug in AllegroCL then? Thanks, Edi. From edi at agharta.de Sat Jun 2 22:16:40 2007 From: edi at agharta.de (Edi Weitz) Date: Sun, 03 Jun 2007 00:16:40 +0200 Subject: [hunchentoot-devel] beginners output problem In-Reply-To: (Andy Chambers's message of "Sat, 2 Jun 2007 21:40:16 +0100") References: Message-ID: On Sat, 2 Jun 2007 21:40:16 +0100, "Andy Chambers" wrote: > The send-reply function below is part of some code that transforms > sexp's according to specified rules a-la-sxml from the scheme world. > > My problem is that when I evaluate the let form on its own, it > returns "" as expected. However, when I request the > page served by the easy-handler, I get the following condition. > > I/O timeout reading # > > I'm using sbcl on debian with hunchentoot just asdf-intalled as a > local package. Can anyone suggest why the let form would evaluate > ok on its own but not inside the easy-handler? The handler looks OK to me, and I just tried it with LWW 5.0.2 where it works fine and the browser sees the expected result. I currently don't have an idea why this doesn't work in your setup, sorry. Cheers, Edi. From jmckitrick at reedlarkeygroup.com Mon Jun 4 13:28:54 2007 From: jmckitrick at reedlarkeygroup.com (Jonathon McKitrick) Date: Mon, 4 Jun 2007 09:28:54 -0400 Subject: [hunchentoot-devel] PUT parameters missing? Message-ID: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> I'm waaay behind in updating from 0.5.0, so yesterday I grabbed 0.11.1. I use a lot of PUT requests in my web app, and data is sent in parameters just like in POST. However, the latest version of hunchentoot does not appear to populate post-parameters in a PUT request. -- Jonathon McKitrick jmckitrick at reedlarkeygroup.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Mon Jun 4 13:34:58 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 04 Jun 2007 15:34:58 +0200 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> (Jonathon McKitrick's message of "Mon, 4 Jun 2007 09:28:54 -0400") References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> Message-ID: On Mon, 4 Jun 2007 09:28:54 -0400, Jonathon McKitrick wrote: > I'm waaay behind in updating from 0.5.0, so yesterday I grabbed > 0.11.1. I use a lot of PUT requests in my web app, and data is sent > in parameters just like in POST. However, the latest version of > hunchentoot does not appear to populate post-parameters in a PUT > request. http://common-lisp.net/pipermail/tbnl-devel/2007-May/001360.html From jmckitrick at reedlarkeygroup.com Mon Jun 4 13:48:19 2007 From: jmckitrick at reedlarkeygroup.com (Jonathon McKitrick) Date: Mon, 4 Jun 2007 09:48:19 -0400 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> Message-ID: On Jun 4, 2007, at 9:34 AM, Edi Weitz wrote: > On Mon, 4 Jun 2007 09:28:54 -0400, Jonathon McKitrick > wrote: > >> I'm waaay behind in updating from 0.5.0, so yesterday I grabbed >> 0.11.1. I use a lot of PUT requests in my web app, and data is sent >> in parameters just like in POST. However, the latest version of >> hunchentoot does not appear to populate post-parameters in a PUT >> request. > > http://common-lisp.net/pipermail/tbnl-devel/2007-May/001360.html I'm using REST as well, so maybe I can offer some thoughts on this. POST is used when sending data to a URL endpoint, and often it means an entity is created, like an SQL INSERT. PUT is used to update some properties of an already existing entity, like an SQL UPDATE. At least that's the most common use. So with a POST reply I create an entity and return the URL in the 'location' header of the response. A PUT request applies the parameters to the entity identified by the URL. -- Jonathon McKitrick jmckitrick at reedlarkeygroup.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Mon Jun 4 14:30:47 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 04 Jun 2007 16:30:47 +0200 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: (Jonathon McKitrick's message of "Mon, 4 Jun 2007 09:48:19 -0400") References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> Message-ID: On Mon, 4 Jun 2007 09:48:19 -0400, Jonathon McKitrick wrote: > I'm using REST as well, so maybe I can offer some thoughts on this. > POST is used when sending data to a URL endpoint, and often it means > an entity is created, like an SQL INSERT. PUT is used to update > some properties of an already existing entity, like an SQL UPDATE. > At least that's the most common use. So with a POST reply I create > an entity and return the URL in the 'location' header of the > response. A PUT request applies the parameters to the entity > identified by the URL. Strange. To me that seems counterintuitive and not really in sync with how PUT is described[1] in RFC 2616. But, anyway, if you REST guys think you need this, send a reasonable patch[2] and I'll review it. Cheers, Edi. [1] "The PUT method requests that the enclosed entity be stored under the supplied Request-URI." [2] http://weitz.de/patches.html From jmckitrick at reedlarkeygroup.com Mon Jun 4 15:30:26 2007 From: jmckitrick at reedlarkeygroup.com (Jonathon McKitrick) Date: Mon, 4 Jun 2007 11:30:26 -0400 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> Message-ID: <8DA9AA89-94AE-4027-9CE9-59E1597E70F7@reedlarkeygroup.com> On Jun 4, 2007, at 10:30 AM, Edi Weitz wrote: > On Mon, 4 Jun 2007 09:48:19 -0400, Jonathon McKitrick > wrote: > >> I'm using REST as well, so maybe I can offer some thoughts on this. >> POST is used when sending data to a URL endpoint, and often it means >> an entity is created, like an SQL INSERT. PUT is used to update >> some properties of an already existing entity, like an SQL UPDATE. >> At least that's the most common use. So with a POST reply I create >> an entity and return the URL in the 'location' header of the >> response. A PUT request applies the parameters to the entity >> identified by the URL. > > Strange. To me that seems counterintuitive and not really in sync > with how PUT is described[1] in RFC 2616. But, anyway, if you REST > guys think you need this, send a reasonable patch[2] and I'll review > it. Since I just jumped from 0.5.0 to 0.11.1, do you remember where in that span you made the change to remove post-param support for PUT? I'll start diffing from there.... -- Jonathon McKitrick jmckitrick at reedlarkeygroup.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Mon Jun 4 15:42:56 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 04 Jun 2007 17:42:56 +0200 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: <8DA9AA89-94AE-4027-9CE9-59E1597E70F7@reedlarkeygroup.com> (Jonathon McKitrick's message of "Mon, 4 Jun 2007 11:30:26 -0400") References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> <8DA9AA89-94AE-4027-9CE9-59E1597E70F7@reedlarkeygroup.com> Message-ID: On Mon, 4 Jun 2007 11:30:26 -0400, Jonathon McKitrick wrote: > Since I just jumped from 0.5.0 to 0.11.1, do you remember where in > that span you made the change to remove post-param support for PUT? There never was official support for that, that's why they're called POST parameters. Maybe it worked by accident. Right now, there's a test in request.lisp which explicitely looks at the request method. ;; if the content-type is 'application/x-www-form-urlencoded' ;; or 'multipart/form-data', compute the post parameters from ;; the content body (when (eq (request-method request) :post) Now that I think of it, this should probably be replaced with some user-configurable variable which holds a list of methods where the default value is just the one-element list '(:post): (when (member (request-method request) *foo* :test #'eq) From jmckitrick at reedlarkeygroup.com Mon Jun 4 20:21:55 2007 From: jmckitrick at reedlarkeygroup.com (Jonathon McKitrick) Date: Mon, 4 Jun 2007 16:21:55 -0400 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> <8DA9AA89-94AE-4027-9CE9-59E1597E70F7@reedlarkeygroup.com> Message-ID: <38CC5CEA-20A4-4462-B89C-0DD73F17E618@reedlarkeygroup.com> On Jun 4, 2007, at 11:42 AM, Edi Weitz wrote: > On Mon, 4 Jun 2007 11:30:26 -0400, Jonathon McKitrick > wrote: > >> Since I just jumped from 0.5.0 to 0.11.1, do you remember where in >> that span you made the change to remove post-param support for PUT? > > There never was official support for that, that's why they're called > POST parameters. Maybe it worked by accident. Right now, there's a > test in request.lisp which explicitely looks at the request method. > > ;; if the content-type is 'application/x-www-form- > urlencoded' > ;; or 'multipart/form-data', compute the post parameters > from > ;; the content body > (when (eq (request-method request) :post) > > Now that I think of it, this should probably be replaced with some > user-configurable variable which holds a list of methods where the > default value is just the one-element list '(:post): > > (when (member (request-method request) *foo* :test #'eq) I think that would do the trick nicely! -- Jonathon McKitrick jmckitrick at reedlarkeygroup.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lispercat at gmail.com Sat Jun 16 15:04:45 2007 From: lispercat at gmail.com (Andrei Stebakov) Date: Sat, 16 Jun 2007 11:04:45 -0400 Subject: [hunchentoot-devel] session cookie URI part gets in LSP expressions in Internet Explorer 7.0 Message-ID: Since I couldn't find a mailing list for hunchentoot LSP port by Mac Chan I am posting here. The problem is that when I create a lsp page for hunchentoot and the page starts with <%(no-cache)%> <%(start-session)%> The page also has a bunch of inline expressions like > When I go to Internet Explorer 7.0 (In Firefox it doesn't happen) and read the html source of the generated page I see following: Basically all of my inline expressions like <%= (some-func) %> gets prepended by the '?customize=16%3A5757A00F8834482F324324AED6F91D16' When I hit the "refresh page" button it generates a good page without the artifacts. I am not sure if the problem on the LSP or hunchentoot side. Maybe no fix is required and I have to do something differently. Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Sat Jun 16 15:18:35 2007 From: edi at agharta.de (Edi Weitz) Date: Sat, 16 Jun 2007 17:18:35 +0200 Subject: [hunchentoot-devel] session cookie URI part gets in LSP expressions in Internet Explorer 7.0 In-Reply-To: (Andrei Stebakov's message of "Sat, 16 Jun 2007 11:04:45 -0400") References: Message-ID: On Sat, 16 Jun 2007 11:04:45 -0400, "Andrei Stebakov" wrote: > Since I couldn't find a mailing list for hunchentoot LSP port by Mac > Chan I am posting here. It's fine with me if you use the Hunchentoot list for this, although Mac himself will probably have to answer this one. FWIW, I'll be in the US for a couple of days, so if someone is expecting answers from me, they'll probably have to wait for at least another week. Cheers, Edi. From mathias.dahl at gmail.com Sat Jun 16 16:16:10 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Sat, 16 Jun 2007 18:16:10 +0200 Subject: [hunchentoot-devel] url-encoding file names Message-ID: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> Hi! I am encoding file names using the url-encode function in Hunchentoot. However, it encodes chars such as space and / as well, which makes at least my browser (Firefox) or web server not understand that they are indeed links to files I have shared. So I have this workaround: (defun replace-all (string part replacement &key (test #'char=)) "Returns a new string in which all the occurences of the part is replaced with replacement." (with-output-to-string (out) (loop with part-length = (length part) for old-pos = 0 then (+ pos part-length) for pos = (search part string :start2 old-pos :test test) do (write-string string out :start old-pos :end (or pos (length string))) when pos do (write-string replacement out) while pos))) (defun replace-some-encoded (file-name) ;; Some chars should not be encoded, apparently... (replace-all (replace-all file-name "+" "%20") "%2F" "/")) (defun url-encode-file-name (file-name) (replace-some-encoded (hunchentoot:url-encode file-name :utf-8))) The above gives URLs like these: http://myserver/Tommy%20K%C3%B6rberg%2FTommy%20K%C3%B6rberg%20-%20Stad%20i%20ljus.mp3 And without the workaround I get this: http://klibb.com/muuartist/Tommy+K%C3%B6rberg%2FTommy+K%C3%B6rberg+-+Anthem.mp3 I searched the doc for "file name" to see if there was some special method suited for encoding file names with path information but could not find one. Do I need the above workaround? Thanks! /Mathias From emailmac at gmail.com Sat Jun 16 17:14:43 2007 From: emailmac at gmail.com (Mac Chan) Date: Sat, 16 Jun 2007 10:14:43 -0700 Subject: [hunchentoot-devel] session cookie URI part gets in LSP expressions in Internet Explorer 7.0 In-Reply-To: References: Message-ID: <4877ae640706161014y4be82c19pa358f5ec078c413@mail.gmail.com> Hi Andrei, > On 6/16/07, Andrei Stebakov wrote: > The problem is that when I create a lsp page for hunchentoot and the page > starts with > <%(no-cache)%> > <%(start-session)%> > > When I go to Internet Explorer 7.0 (In Firefox it doesn't happen) and read > the html source of the generated page I see following: > src='?customize=16%3A5757A00F8834482F324324AED6F91D16'/lisphandler/images/HeaderTransp.gif> > When I hit the "refresh page" button it generates a good page without the > artifacts. Do you know about this? http://weitz.de/hunchentoot/#*rewrite-for-session-urls* Can you try setting *content-types-for-url-rewrite* to NIL and see if this still happens? http://weitz.de/hunchentoot/#*content-types-for-url-rewrite* > Basically all of my inline expressions like <%= (some-func) %> gets > prepended by the > '?customize=16%3A5757A00F8834482F324324AED6F91D16' If the above doesn't help, could you come up with a simple test case that can reproduce the problem and email me the source code? > I am not sure if the problem on the LSP or hunchentoot side. Maybe no fix is > required and I have to do something differently. > Since I couldn't find a mailing list for hunchentoot LSP port by Mac Chan I > am posting here. I'd rather not pollute this mailing list with non-hunchentoot related issue (unless you're convinced that it is of hunchentoot users' interest). I've added my contact info in the cliki page and the readme file, so you can just email me with questions related to LSP. Thanks, -- Mac From lispercat at gmail.com Sat Jun 16 21:49:19 2007 From: lispercat at gmail.com (Andrei Stebakov) Date: Sat, 16 Jun 2007 17:49:19 -0400 Subject: [hunchentoot-devel] session cookie URI part gets in LSP expressions in Internet Explorer 7.0 In-Reply-To: <4877ae640706161014y4be82c19pa358f5ec078c413@mail.gmail.com> References: <4877ae640706161014y4be82c19pa358f5ec078c413@mail.gmail.com> Message-ID: Thank you, Mac. What you suggested works. Andrei On 6/16/07, Mac Chan wrote: > > Hi Andrei, > > > On 6/16/07, Andrei Stebakov wrote: > > The problem is that when I create a lsp page for hunchentoot and the > page > > starts with > > <%(no-cache)%> > > <%(start-session)%> > > > > When I go to Internet Explorer 7.0 (In Firefox it doesn't happen) and > read > > the html source of the generated page I see following: > > > > src='?customize=16%3A5757A00F8834482F324324AED6F91D16'/lisphandler/images/HeaderTransp.gif> > > When I hit the "refresh page" button it generates a good page without > the > > artifacts. > > Do you know about this? > > http://weitz.de/hunchentoot/#*rewrite-for-session-urls* > > Can you try setting *content-types-for-url-rewrite* to NIL and see if > this still happens? > > http://weitz.de/hunchentoot/#*content-types-for-url-rewrite* > > > Basically all of my inline expressions like <%= (some-func) %> gets > > prepended by the > > '?customize=16%3A5757A00F8834482F324324AED6F91D16' > > If the above doesn't help, could you come up with a simple test case > that can reproduce the problem and email me the source code? > > > I am not sure if the problem on the LSP or hunchentoot side. Maybe no > fix is > > required and I have to do something differently. > > Since I couldn't find a mailing list for hunchentoot LSP port by Mac > Chan I > > am posting here. > > I'd rather not pollute this mailing list with non-hunchentoot related > issue (unless you're convinced that it is of hunchentoot users' > interest). > > I've added my contact info in the cliki page and the readme file, so > you can just email me with questions related to LSP. > > Thanks, > -- Mac > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckitrick at reedlarkeygroup.com Sun Jun 17 15:26:41 2007 From: jmckitrick at reedlarkeygroup.com (Jonathon McKitrick) Date: Sun, 17 Jun 2007 11:26:41 -0400 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> Message-ID: On Jun 4, 2007, at 10:30 AM, Edi Weitz wrote: > On Mon, 4 Jun 2007 09:48:19 -0400, Jonathon McKitrick > wrote: > >> I'm using REST as well, so maybe I can offer some thoughts on this. >> POST is used when sending data to a URL endpoint, and often it means >> an entity is created, like an SQL INSERT. PUT is used to update >> some properties of an already existing entity, like an SQL UPDATE. >> At least that's the most common use. So with a POST reply I create >> an entity and return the URL in the 'location' header of the >> response. A PUT request applies the parameters to the entity >> identified by the URL. > > Strange. To me that seems counterintuitive and not really in sync > with how PUT is described[1] in RFC 2616. But, anyway, if you REST > guys think you need this, send a reasonable patch[2] and I'll review > it. I've been testing some code to PUT an XML entity rather than populating the POST parameters, but I'm not sure how to get the content from the request via hunchentoot. I've found GET-CONTENT in CL-WEBDAV, but that code seems to read the raw content data as a file, while I'm sending data as an XML document. Is there a simple way to do this without resorting to another library? -- Jonathon McKitrick jmckitrick at reedlarkeygroup.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rm at seid-online.de Sun Jun 17 17:44:17 2007 From: rm at seid-online.de (Ralf Mattes) Date: Sun, 17 Jun 2007 19:44:17 +0200 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> Message-ID: <1182102258.7459.3.camel@localhost.localdomain> On Sun, 2007-06-17 at 11:26 -0400, Jonathon McKitrick wrote: > [snip] > > > I've been testing some code to PUT an XML entity rather than > populating the POST parameters, but I'm not sure how to get the > content from the request via hunchentoot. I've found GET-CONTENT in > CL-WEBDAV, but that code seems to read the raw content data as a file, > while I'm sending data as an XML document. Is there a simple way to > do this without resorting to another library? Well - you need to implement a handler for the PUT method. Inside this handler you must read the content from the stream - have a look at 'raw-post-data' in 'hunchenoot/request.lisp', esp. the last sentence of the documentation: "... Note that this function is slightly misnamed because a client can send content even if the request method is not POST." HTH Ralf Mattes > -- > Jonathon McKitrick > jmckitrick at reedlarkeygroup.com > > > > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From edi at agharta.de Sun Jun 17 19:36:28 2007 From: edi at agharta.de (Edi Weitz) Date: Sun, 17 Jun 2007 21:36:28 +0200 Subject: [hunchentoot-devel] PUT parameters missing? In-Reply-To: <1182102258.7459.3.camel@localhost.localdomain> (Ralf Mattes's message of "Sun, 17 Jun 2007 19:44:17 +0200") References: <4ABF3C81-7A01-40B9-B1DF-B59724C89005@reedlarkeygroup.com> <1182102258.7459.3.camel@localhost.localdomain> Message-ID: On Sun, 17 Jun 2007 19:44:17 +0200, Ralf Mattes wrote: > Well - you need to implement a handler for the PUT method. Inside > this handler you must read the content from the stream - have a look > at 'raw-post-data' in 'hunchenoot/request.lisp', esp. the last > sentence of the documentation: > > "... Note that this function is slightly misnamed because a client > can send content even if the request method is not POST." What Ralf said. Note specifically that RAW-POST-DATA is exported and that there's a keyword argument WANT-STREAM. (It is mentioned in the doc string, but I just noticed it's not show in the function's signature in the HTML documentation. This'll be fixed.) From edi at agharta.de Sun Jun 17 20:01:47 2007 From: edi at agharta.de (Edi Weitz) Date: Sun, 17 Jun 2007 16:01:47 -0400 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> (Mathias Dahl's message of "Sat, 16 Jun 2007 18:16:10 +0200") References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> Message-ID: On Sat, 16 Jun 2007 18:16:10 +0200, "Mathias Dahl" wrote: > I am encoding file names using the url-encode function in > Hunchentoot. However, it encodes chars such as space and / as well, > which makes at least my browser (Firefox) or web server not > understand that they are indeed links to files I have shared. This question actually has nothing to do with Hunchentoot but with understanding what URL-encoding is. See for example: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm Forward slashes, for example, have special meaning in URLs and thus /must/ be encoded. And the spaces won't confuse Firefox. What you probably want is (something similar) to this (untested): (defun foo (pathspec) (format nil "~{~A/~}~A" (mapcar #'url-encode (rest (pathname-directory pathspec))) (url-encode (file-namestring pathspec)))) HTH, Edi. From mathias.dahl at gmail.com Sun Jun 17 21:35:52 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Sun, 17 Jun 2007 23:35:52 +0200 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> Message-ID: <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> > This question actually has nothing to do with Hunchentoot but with > understanding what URL-encoding is. I realized that after posting, URL-encoding is for encoding values that otherwise has special meaning in URLs. > And the spaces won't confuse Firefox. That does not work for me. I cannot say if it is Firefox or Apache that mess up. These two URLs are supposed to be interchangeable, but only the latter works for me when I paste it in the address field of Firefox: http://myserver/somepath/Tommy+K%C3%B6rberg/Tommy+K%C3%B6rberg+-+Stad+i+ljus.mp3 http://myserver/somepath/Tommy%20K%C3%B6rberg/Tommy%20K%C3%B6rberg%20-%20Stad%20i%20ljus.mp3 The former gives me this: ==== Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 myserver ... ==== > What you probably want is (something similar) to this (untested): > > (defun foo (pathspec) > (format nil "~{~A/~}~A" > (mapcar #'url-encode > (rest (pathname-directory pathspec))) > (url-encode (file-namestring pathspec)))) > Ah, yes it is, thanks! That is what I wondered if it existed in Hunchentoot :). Maybe it could be an addition to Hunchentoot for your next release, url-encode-path-parts or similar? With an optional format parameter. Modulo my problem with "+" vs "%20", of course... /Mathias From mathias.dahl at gmail.com Sun Jun 17 21:39:21 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Sun, 17 Jun 2007 23:39:21 +0200 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> Message-ID: <7dbe73ed0706171439r37c4651di766fa161a816f7c8@mail.gmail.com> > > And the spaces won't confuse Firefox. > > That does not work for me. I cannot say if it is Firefox or Apache > that mess up. These two URLs are supposed to be interchangeable, but > only the latter works for me when I paste it in the address field of > Firefox: Sorry for not reading what you wrote. You wrote "spaces" and I just assumed you meant the spaces converted to pluses. Spaces might work as they are, I haven't tested, but still url-encode encodes to these pluses so I have to convert them to %20 (or maybe just a space, I will test this). /Mathias From mathias.dahl at gmail.com Sun Jun 17 21:41:23 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Sun, 17 Jun 2007 23:41:23 +0200 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706171439r37c4651di766fa161a816f7c8@mail.gmail.com> References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706171439r37c4651di766fa161a816f7c8@mail.gmail.com> Message-ID: <7dbe73ed0706171441j21ad14dbpfeea685e1e17ea1b@mail.gmail.com> > pluses so I have to convert them to %20 (or maybe just a space, I will > test this). Yes, spaces works as they are, so one don't need to encode them at all actually. /Mathias From edi at agharta.de Mon Jun 18 00:04:32 2007 From: edi at agharta.de (Edi Weitz) Date: Sun, 17 Jun 2007 20:04:32 -0400 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> (Mathias Dahl's message of "Sun, 17 Jun 2007 23:35:52 +0200") References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> Message-ID: On Sun, 17 Jun 2007 23:35:52 +0200, "Mathias Dahl" wrote: > That does not work for me. I cannot say if it is Firefox or Apache > that mess up. These two URLs are supposed to be interchangeable, but > only the latter works for me when I paste it in the address field of > Firefox: > > http://myserver/somepath/Tommy+K%C3%B6rberg/Tommy+K%C3%B6rberg+-+Stad+i+ljus.mp3 > > http://myserver/somepath/Tommy%20K%C3%B6rberg/Tommy%20K%C3%B6rberg%20-%20Stad%20i%20ljus.mp3 Well, only the latter URL was created with Hunchentoot's URL-ENCODE, right? > The former gives me this: > > ==== > Object not found! > > The requested URL was not found on this server. If you entered the URL > manually please check your spelling and try again. > > If you think this is a server error, please contact the webmaster. > Error 404 > myserver > ... > ==== Where does this error message come from? Not from Hunchentoot it seems. From mathias.dahl at gmail.com Mon Jun 18 08:50:10 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Mon, 18 Jun 2007 10:50:10 +0200 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> Message-ID: <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> > > http://myserver/somepath/Tommy+K%C3%B6rberg/Tommy+K%C3%B6rberg+-+Stad+i+ljus.mp3 > > > > http://myserver/somepath/Tommy%20K%C3%B6rberg/Tommy%20K%C3%B6rberg%20-%20Stad%20i%20ljus.mp3 > > Well, only the latter URL was created with Hunchentoot's URL-ENCODE, > right? No, the former. URL-ENCODE encodes the spaces from the file names, to pluses, so even if I use the nice function you provided me with, it does not work, I have to replace the pluses with either a space or %20. > > The former gives me this: > > > > ==== > > Object not found! > > > > The requested URL was not found on this server. If you entered the URL > > manually please check your spelling and try again. > > > > If you think this is a server error, please contact the webmaster. > > Error 404 > > myserver > > ... > > ==== > > Where does this error message come from? Not from Hunchentoot it > seems. Sorry, no no, I am serving my mp3-files using Apache only. I was just explaining that for some reason a plus character does not work in URLs if I want to download a file from my web server using Firefox. This problem has nothing to do with Hunchentoot. Maybe we should drop this, I am not trying to critizise Hunchentoot, I am just discussing whether I need to do my (replace-all (replace-all (url-encode file-name ...) ...) ...) or if there was any way to do this directly using Hunchentoot. The foo defun you gave me is close, but returns those pluses that does not seem to work in Firefox/Apache. Maybe you thought I also used Hunchentoot to deliver the mp3-files to the client, when I just lets Apache to do it. Thanks! /Mathias From edi at agharta.de Mon Jun 18 10:52:44 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 18 Jun 2007 06:52:44 -0400 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> (Mathias Dahl's message of "Mon, 18 Jun 2007 10:50:10 +0200") References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> Message-ID: On Mon, 18 Jun 2007 10:50:10 +0200, "Mathias Dahl" wrote: > No, the former. URL-ENCODE encodes the spaces from the file names, > to pluses, so even if I use the nice function you provided me with, > it does not work, I have to replace the pluses with either a space > or %20. CL-USER 1 > (hunchentoot:url-encode "A Space") "A%20Space" Which version of Hunchentoot are you using? > Sorry, no no, I am serving my mp3-files using Apache only. I was > just explaining that for some reason a plus character does not work > in URLs if I want to download a file from my web server using > Firefox. This problem has nothing to do with Hunchentoot. Well, in /some/ cases a plus does work. Actually, some days ago Peter Seibel asked me whether I could switch back Hunchentoot's behaviour to emitting "+" instead of "%20". But "%20" is the right thing to do. > Maybe we should drop this, I am not trying to critizise Hunchentoot, > I am just discussing whether I need to do my (replace-all > (replace-all (url-encode file-name ...) ...) ...) or if there was > any way to do this directly using Hunchentoot. The foo defun you > gave me is close, but returns those pluses that does not seem to > work in Firefox/Apache. It /should/ work with the FOO function I sent /and/ the latest version of Hunchentoot. You might also want to look at how CL-WEBDAV works. > Maybe you thought I also used Hunchentoot to deliver the mp3-files > to the client, when I just lets Apache to do it. If you use Hunchentoot to deliver the files, it should be able to cope with both "+" and "%20". Cheers, Edi. From rm at seid-online.de Mon Jun 18 12:59:38 2007 From: rm at seid-online.de (Ralf Mattes) Date: Mon, 18 Jun 2007 14:59:38 +0200 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706171441j21ad14dbpfeea685e1e17ea1b@mail.gmail.com> References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706171439r37c4651di766fa161a816f7c8@mail.gmail.com> <7dbe73ed0706171441j21ad14dbpfeea685e1e17ea1b@mail.gmail.com> Message-ID: <1182171578.6250.4.camel@localhost.localdomain> On Sun, 2007-06-17 at 23:41 +0200, Mathias Dahl wrote: > > pluses so I have to convert them to %20 (or maybe just a space, I will > > test this). > > Yes, spaces works as they are, so one don't need to encode them at all actually. You do, as a matter of fact ;-) Seriously: Space characters are illegal in URLs (since the different parts of a request line a separated by spaces - Iff your client would send: 'GET /files/stuff/honk zisch HTTP/1.1' your server would be rather confused about protocol version 'zisch'). Now, since the early Web was often build by designers rather than programmers _some_ browsers silently convert spaces to '%20' sequences ... but i wouldn't rely on that feature - i've seen browsers that don't. Cheers, RalfD > /Mathias > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From mathias.dahl at gmail.com Mon Jun 18 16:05:39 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Mon, 18 Jun 2007 18:05:39 +0200 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> Message-ID: <7dbe73ed0706180905k50d42b4ew28da3559982d3827@mail.gmail.com> > CL-USER 1 > (hunchentoot:url-encode "A Space") > "A%20Space" Aha! Look: MP3SEARCH> (hunchentoot:url-encode "A Space") "A+Space" > Which version of Hunchentoot are you using? Dare I say it? :) 0.4.11... I'm sorry I didn't report the version earlier I'll try the new version. /Mathias From mathias.dahl at gmail.com Mon Jun 18 16:37:31 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Mon, 18 Jun 2007 18:37:31 +0200 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706180905k50d42b4ew28da3559982d3827@mail.gmail.com> References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> <7dbe73ed0706180905k50d42b4ew28da3559982d3827@mail.gmail.com> Message-ID: <7dbe73ed0706180937r5116dba8n3bd9f3c8d1551ae8@mail.gmail.com> > Dare I say it? :) 0.4.11... > > I'm sorry I didn't report the version earlier I'll try the new version. Tried the latest version. Works. Beautiful! I can not remove my replace-all workaround and my code suddenly got a couple of lines smaller. :) Thanks! /Mathias From edi at agharta.de Mon Jun 18 18:10:10 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 18 Jun 2007 14:10:10 -0400 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: <7dbe73ed0706180905k50d42b4ew28da3559982d3827@mail.gmail.com> (Mathias Dahl's message of "Mon, 18 Jun 2007 18:05:39 +0200") References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> <7dbe73ed0706180905k50d42b4ew28da3559982d3827@mail.gmail.com> Message-ID: On Mon, 18 Jun 2007 18:05:39 +0200, "Mathias Dahl" wrote: >> Which version of Hunchentoot are you using? > > Dare I say it? :) 0.4.11... Ha! That's prehistoric!! From penguin at ocean.vvo.ru Tue Jun 19 02:33:51 2007 From: penguin at ocean.vvo.ru (Igor Plekhov) Date: Tue, 19 Jun 2007 13:33:51 +1100 Subject: [hunchentoot-devel] url-encoding file names In-Reply-To: References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> <7dbe73ed0706180905k50d42b4ew28da3559982d3827@mail.gmail.com> Message-ID: <20070619023351.GB3975@ocean.vvo.ru> On Mon, 18 Jun, 2007 at 14:10:10 -0400, Edi Weitz wrote: > > >> Which version of Hunchentoot are you using? > > > > Dare I say it? :) 0.4.11... > > Ha! That's prehistoric!! I'm using 0.4.5 for development. It works fine. So I don't bother with upgrade :-) -- Registered Linux User #124759 From mathias.dahl at gmail.com Tue Jun 19 07:30:38 2007 From: mathias.dahl at gmail.com (Mathias Dahl) Date: Tue, 19 Jun 2007 09:30:38 +0200 Subject: [hunchentoot-devel] Re: url-encoding file names In-Reply-To: <20070619023351.GB3975@ocean.vvo.ru> References: <7dbe73ed0706160916o40ce93aak5c205fb8cc00e3cc@mail.gmail.com> <7dbe73ed0706171435g59e52fb1oe64ce343cf8888c1@mail.gmail.com> <7dbe73ed0706180150x23a901e7s4a176a148585e6e3@mail.gmail.com> <7dbe73ed0706180905k50d42b4ew28da3559982d3827@mail.gmail.com> <20070619023351.GB3975@ocean.vvo.ru> Message-ID: <7dbe73ed0706190030h7494d383hcf0a23ab3d154ad0@mail.gmail.com> Too late, the new version is already compiled into my core file... ;) /Mathias On 6/19/07, Igor Plekhov wrote: > On Mon, 18 Jun, 2007 at 14:10:10 -0400, Edi Weitz wrote: > > > > >> Which version of Hunchentoot are you using? > > > > > > Dare I say it? :) 0.4.11... > > > > Ha! That's prehistoric!! > > I'm using 0.4.5 for development. It works fine. So I don't bother > with upgrade :-) > > > -- > Registered Linux User #124759 > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From erick at fsl.org.mx Sat Jun 23 01:55:43 2007 From: erick at fsl.org.mx (Erick Lopez Carreon) Date: Fri, 22 Jun 2007 20:55:43 -0500 Subject: [hunchentoot-devel] Custom default page Message-ID: <1182563743.4068.59.camel@localhost.cibercalli.com> Hello: I'm trying to point the Hunchentoot default page to my /index page, but i can't figure how. Here is my dispatch table: (setq *dispatch-table* (nconc (list 'dispatch-easy-handlers (create-static-file-dispatcher-and-handler "/favicon.ico" "/usr/share/vhosts/hdemo/favicon.ico") (create-static-file-dispatcher-and-handler "/main.css" "/usr/share/vhosts/hdemo/main.css")) (mapcar (lambda (args) (apply #'create-prefix-dispatcher args)) '(("/index" main-page) ("/admin" admin-page) ("/showpost" showpost) ("/editpost" editpost) ("/showtopic" show-topic-page))) (list #'default-dispatcher))) What i want is when i point my browser to: http://localhost:3000 I get the /index page not the default page (currently i get the Hunchentoot defaul page). Any clues would be appreciated. Thank you. From jeffrey at cunningham.net Sat Jun 23 02:01:05 2007 From: jeffrey at cunningham.net (Jeff Cunningham) Date: Fri, 22 Jun 2007 19:01:05 -0700 Subject: [hunchentoot-devel] Custom default page In-Reply-To: <1182563743.4068.59.camel@localhost.cibercalli.com> References: <1182563743.4068.59.camel@localhost.cibercalli.com> Message-ID: <467C7EE1.502@cunningham.net> Erick Lopez Carreon wrote: > Hello: > > I'm trying to point the Hunchentoot default page to my /index page, but > i can't figure how. > > Here is my dispatch table: > > (setq *dispatch-table* > (nconc > (list 'dispatch-easy-handlers > (create-static-file-dispatcher-and-handler > "/favicon.ico" > "/usr/share/vhosts/hdemo/favicon.ico") > (create-static-file-dispatcher-and-handler > "/main.css" > "/usr/share/vhosts/hdemo/main.css")) > (mapcar (lambda (args) > (apply #'create-prefix-dispatcher args)) > '(("/index" main-page) > ("/admin" admin-page) > ("/showpost" showpost) > ("/editpost" editpost) > ("/showtopic" show-topic-page))) > (list #'default-dispatcher))) > > What i want is when i point my browser to: > > http://localhost:3000 > > I get the /index page not the default page (currently i get the > Hunchentoot defaul page). > > Any clues would be appreciated. > > Thank you. > > Try adding this form to the bottom (after the /showtopic handler) ("/" main-page) --Jeff From erick at fsl.org.mx Sat Jun 23 02:56:22 2007 From: erick at fsl.org.mx (Erick Lopez Carreon) Date: Fri, 22 Jun 2007 21:56:22 -0500 Subject: [hunchentoot-devel] Custom default page In-Reply-To: <467C7EE1.502@cunningham.net> References: <1182563743.4068.59.camel@localhost.cibercalli.com> <467C7EE1.502@cunningham.net> Message-ID: <1182567382.4068.70.camel@localhost.cibercalli.com> On Fri, 2007-06-22 at 19:01 -0700, Jeff Cunningham wrote: > > > Try adding this form to the bottom (after the /showtopic handler) > > ("/" main-page) > That does the trick! :) A few moments ago i try something similar: (mapcar (lambda (args) (apply #'create-prefix-dispatcher args)) '(("/" main-page) ("/admin" admin-page) ("/showpost" showpost) ("/editpost" editpost) ("/showtopic" show-topic-page))) (list #'default-dispatcher))) But then the only page i could see was the one of the main-page handler 8) so now I realize that the order is relevant :) (and i suspect i need re-read the documentation). Thank you very much. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From doctorbill.news at gmail.com Wed Jun 27 16:36:49 2007 From: doctorbill.news at gmail.com (William Bland) Date: Wed, 27 Jun 2007 09:36:49 -0700 Subject: [hunchentoot-devel] New app using Hunchentoot Message-ID: <31ea564c0706270936r56389907h3e41060c6618b217@mail.gmail.com> Hi, Just wanted to say thanks for Hunchentoot and to let the list know I launched a new web app yesterday that uses it. In the app's first 24 hours, Hunchentoot has responded to more than 1.5 million http requests and has been absolutely rock-solid the whole time. The app, http://clutu.com is a collaborative crossword game. It's written 100% in CL, using sbcl on an ubuntu vps. In addition to Hunchentoot I used cl-ppcre, cl-who and mel-base. Thanks again for providing such an awesome web server to the Lisp community. Cheers, Bill. -- William Bland: http://abstractnonsense.com/ Lisp documentation: http://lispdoc.com/ From austin at pettomato.com Wed Jun 27 17:00:56 2007 From: austin at pettomato.com (Austin Haas) Date: Wed, 27 Jun 2007 13:00:56 -0400 Subject: [hunchentoot-devel] New app using Hunchentoot In-Reply-To: <31ea564c0706270936r56389907h3e41060c6618b217@mail.gmail.com> References: <31ea564c0706270936r56389907h3e41060c6618b217@mail.gmail.com> Message-ID: <20070627170056.GD3628@bean.chicago> This is so awesome!!! This is exactly the type of thing that I've been talking about for collaboration and multiplayer games. You don't need a lobby! Great work and it's awesome to see Hunchentoot used for something like this. -austin -- Austin Haas Pet Tomato, Inc. http://pettomato.com On Wed Jun 27 09:36 , William Bland wrote: > Hi, > > Just wanted to say thanks for Hunchentoot and to let the list know I > launched a new web app yesterday that uses it. In the app's first 24 > hours, Hunchentoot has responded to more than 1.5 million http > requests and has been absolutely rock-solid the whole time. > > The app, http://clutu.com is a collaborative crossword game. It's > written 100% in CL, using sbcl on an ubuntu vps. In addition to > Hunchentoot I used cl-ppcre, cl-who and mel-base. > > Thanks again for providing such an awesome web server to the Lisp community. > > Cheers, > Bill. > -- > William Bland: http://abstractnonsense.com/ > Lisp documentation: http://lispdoc.com/ > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From edi at agharta.de Wed Jun 27 17:42:54 2007 From: edi at agharta.de (Edi Weitz) Date: Wed, 27 Jun 2007 19:42:54 +0200 Subject: [hunchentoot-devel] New app using Hunchentoot In-Reply-To: <31ea564c0706270936r56389907h3e41060c6618b217@mail.gmail.com> (William Bland's message of "Wed, 27 Jun 2007 09:36:49 -0700") References: <31ea564c0706270936r56389907h3e41060c6618b217@mail.gmail.com> Message-ID: On Wed, 27 Jun 2007 09:36:49 -0700, "William Bland" wrote: > Just wanted to say thanks for Hunchentoot and to let the list know I > launched a new web app yesterday that uses it. In the app's first > 24 hours, Hunchentoot has responded to more than 1.5 million http > requests and has been absolutely rock-solid the whole time. > > The app, http://clutu.com is a collaborative crossword game. It's > written 100% in CL, using sbcl on an ubuntu vps. In addition to > Hunchentoot I used cl-ppcre, cl-who and mel-base. > > Thanks again for providing such an awesome web server to the Lisp > community. Nice! Thanks for the info. I've added a link to clutu to the Hunchentoot web page. Edi. From gwking at metabang.com Wed Jun 27 19:03:34 2007 From: gwking at metabang.com (Gary King) Date: Wed, 27 Jun 2007 15:03:34 -0400 Subject: [hunchentoot-devel] New app using Hunchentoot In-Reply-To: <31ea564c0706270936r56389907h3e41060c6618b217@mail.gmail.com> References: <31ea564c0706270936r56389907h3e41060c6618b217@mail.gmail.com> Message-ID: <8D6A69EE-D831-4E69-9C5B-814EE06C0986@metabang.com> Hi William, Nice job; very slick looking web app. On Jun 27, 2007, at 12:36 PM, William Bland wrote: > Hi, > > Just wanted to say thanks for Hunchentoot and to let the list know I > launched a new web app yesterday that uses it. In the app's first 24 > hours, Hunchentoot has responded to more than 1.5 million http > requests and has been absolutely rock-solid the whole time. > > The app, http://clutu.com is a collaborative crossword game. It's > written 100% in CL, using sbcl on an ubuntu vps. In addition to > Hunchentoot I used cl-ppcre, cl-who and mel-base. > > Thanks again for providing such an awesome web server to the Lisp > community. > > Cheers, > Bill. > -- > William Bland: http://abstractnonsense.com/ > Lisp documentation: http://lispdoc.com/ > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From vodonosov at mail.ru Sat Jun 30 22:32:06 2007 From: vodonosov at mail.ru (Anton Vodonosov) Date: Sun, 01 Jul 2007 02:32:06 +0400 Subject: [hunchentoot-devel] port to sbcl win32: timouts are not implemented Message-ID: Hi! I've just tried hunchentoot on sbcl win32. When you first time start hunchentoot, lisp enters debugger with message "undefined function sb-unix:create-timer" or something in that fashion. Looks like timeouts are not implemented in sbcl win32 so I've changed with-timeout macro in the port-sbcl.lisp to just execute its body without timeout. It helps. (defmacro with-timeout ((seconds &body timeout-forms) &body body) "Executes the code BODY and returns the results of the last form but stops execution after SECONDS seconds and then instead executes the code in TIMEOUT-FORMS." #+:win32 `(progn , at body) #-:win32 `(cl:handler-case (sb-ext:with-timeout ,seconds , at body) (sb-ext:timeout () , at timeout-forms))) Best regards, -Anton