From edi at agharta.de Thu Sep 6 23:35:43 2007 From: edi at agharta.de (Edi Weitz) Date: Fri, 07 Sep 2007 01:35:43 +0200 Subject: [hunchentoot-devel] New release 0.12.0 Message-ID: ChangeLog: Version 0.12.0 2007-09-07 Now uses bound for flexi stream returned by RAW-POST-DATA Needs FLEXI-STREAMS 0.12.0 or higher Version 0.11.2 2007-09-05 Fixed typo in docs Added declaration in server.lisp to appease SBCL Download: http://weitz.de/files/hunchentoot.tar.gz From lispercat at gmail.com Fri Sep 7 03:47:46 2007 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu, 6 Sep 2007 23:47:46 -0400 Subject: [hunchentoot-devel] New release 0.12.0 In-Reply-To: References: Message-ID: Got the latest flexi-streams, chunga and hunchentoot. My hunchentoot project stopped working (when I open the main web page it shows the message "The proxy server received an invalid response from an upstream server"). I am using sbcl 1.0.5. I'll try to investigate it. When I went back to hunchentoot 0.10.0 (with newer flexi-streams and chunga) other things got broken. I guess all those three components are tightly coupled. Andrew On 9/6/07, Edi Weitz wrote: > > ChangeLog: > > Version 0.12.0 > 2007-09-07 > Now uses bound for flexi stream returned by RAW-POST-DATA > Needs FLEXI-STREAMS 0.12.0 or higher > > Version 0.11.2 > 2007-09-05 > Fixed typo in docs > Added declaration in server.lisp to appease SBCL > > Download: > > http://weitz.de/files/hunchentoot.tar.gz > _______________________________________________ > 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 edi at agharta.de Fri Sep 7 06:49:29 2007 From: edi at agharta.de (Edi Weitz) Date: Fri, 07 Sep 2007 08:49:29 +0200 Subject: [hunchentoot-devel] New release 0.12.0 In-Reply-To: (Andrei Stebakov's message of "Thu, 6 Sep 2007 23:47:46 -0400") References: Message-ID: On Thu, 6 Sep 2007 23:47:46 -0400, "Andrei Stebakov" wrote: > Got the latest flexi-streams, chunga and hunchentoot. My hunchentoot > project stopped working (when I open the main web page it shows the > message "The proxy server received an invalid response from an > upstream server"). I am using sbcl 1.0.5. I'll try to investigate > it. Set *CATCH-ERRORS-P* to NIL and send us a backtrace. > When I went back to hunchentoot 0.10.0 (with newer flexi-streams and > chunga) other things got broken. Which ones? "Other things" is not exactly a helpful bug report. What happens if you go back to 0.11.1? > I guess all those three components are tightly coupled. No, not really, except for the dependencies mentioned in the docs. If you can't use Hunchentoot 0.10.0 with newer versions of the other libs, that sounds like a bug. Of course, you're always encouraged to use the newest versions. That's life in the open source world... From yazicivo at ttnet.net.tr Sun Sep 9 21:16:39 2007 From: yazicivo at ttnet.net.tr (Volkan YAZICI) Date: Mon, 10 Sep 2007 0:16:39 +0300 Subject: [hunchentoot-devel] Logging Referers Message-ID: <19662203.1189372599175.JavaMail.root@fep07.ttnet.net.tr> Hi, Is it possible to record referers during logging? (If not, would Edi be inclined to accept a patch implementing *SHOW-REFERERS* parameter?) By the way, I'd also be happy to see a *LOG-FORMAT* configuration parameter for a more generic logging framework. (Is there any for Hunchentoot?) Regards. From edi at agharta.de Sun Sep 9 21:56:02 2007 From: edi at agharta.de (Edi Weitz) Date: Sun, 09 Sep 2007 23:56:02 +0200 Subject: [hunchentoot-devel] Logging Referers In-Reply-To: <19662203.1189372599175.JavaMail.root@fep07.ttnet.net.tr> (Volkan YAZICI's message of "Mon, 10 Sep 2007 0:16:39 +0300") References: <19662203.1189372599175.JavaMail.root@fep07.ttnet.net.tr> Message-ID: On Mon, 10 Sep 2007 0:16:39 +0300, Volkan YAZICI wrote: > Is it possible to record referers during logging? Have you tried? They should be logged if *SHOW-ACCESS-LOG-MESSAGES* is on, otherwise it's a bug. > By the way, I'd also be happy to see a *LOG-FORMAT* configuration > parameter for a more generic logging framework. LOG-MESSAGE is a generic function, so you can bypass it with your own methods. (I just did exactly that two days ago in a project where I had to plug Hunchentoot into an existing application which already had a logging framework.) Cheers, Edi. From yazicivo at ttnet.net.tr Mon Sep 10 07:25:29 2007 From: yazicivo at ttnet.net.tr (Volkan YAZICI) Date: Mon, 10 Sep 2007 10:25:29 +0300 Subject: [hunchentoot-devel] Re: Logging Referers Message-ID: <25655229.1189409129815.JavaMail.root@fep05.ttnet.net.tr> Edi Weitz wrote: > > Is it possible to record referers during logging? > > Have you tried? They should be logged if *SHOW-ACCESS-LOG-MESSAGES* > is on, otherwise it's a bug. CL-USER> hunchentoot:*show-access-log-messages* T CL-USER> (hunchentoot:log-file) "/users/lnxsrv2/fe/vyazici/wiki-content/hunchentoot.log" $ tail -n 1 "/users/lnxsrv2/fe/vyazici/wiki-content/hunchentoot.log" [2007-09-10 07:33:48] 127.0.0.1 (87.118.97.162) - "GET /page/ContentNotFound?path=documents&hunchentoot-session=149%3AC2F4FC7875F6F3FB9C9E1800D6BF7801 HTTP/1.1" 200 2058 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.60767)" Did I miss something? > > By the way, I'd also be happy to see a *LOG-FORMAT* configuration > > parameter for a more generic logging framework. > > LOG-MESSAGE is a generic function, so you can bypass it with your own > methods. (I just did exactly that two days ago in a project where I > had to plug Hunchentoot into an existing application which already had > a logging framework.) I couldn't make myself clear. I meant making default hunchentoot logging format (not manual logging) configured by parameter. Similar to mod_log_config of Apache. For instance, (setq hunchentoot:*log-format* "%v %h %l %u %t \"%r\" %>s %b") Regards. From edi at agharta.de Mon Sep 10 08:08:30 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 10 Sep 2007 10:08:30 +0200 Subject: [hunchentoot-devel] Re: Logging Referers In-Reply-To: <25655229.1189409129815.JavaMail.root@fep05.ttnet.net.tr> (Volkan YAZICI's message of "Mon, 10 Sep 2007 10:25:29 +0300") References: <25655229.1189409129815.JavaMail.root@fep05.ttnet.net.tr> Message-ID: On Mon, 10 Sep 2007 10:25:29 +0300, Volkan YAZICI wrote: > CL-USER> hunchentoot:*show-access-log-messages* > T > CL-USER> (hunchentoot:log-file) > "/users/lnxsrv2/fe/vyazici/wiki-content/hunchentoot.log" > > $ tail -n 1 "/users/lnxsrv2/fe/vyazici/wiki-content/hunchentoot.log" > [2007-09-10 07:33:48] 127.0.0.1 (87.118.97.162) - "GET /page/ContentNotFound?path=documents&hunchentoot-session=149%3AC2F4FC7875F6F3FB9C9E1800D6BF7801 HTTP/1.1" 200 2058 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.60767)" > > Did I miss something? Did you check if the client actually sent a Referer header? This is a typical log file line I see from Hunchentoot. It does contain a Referer entry (which corresponds to the "-" in your example): 127.0.0.1 - "GET /hunchentoot/test/cookie.html HTTP/1.1" 200 924 "http://localhost:4242/hunchentoot/test" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" > I couldn't make myself clear. I meant making default hunchentoot > logging format (not manual logging) configured by parameter. Similar > to mod_log_config of Apache. For instance, > > (setq hunchentoot:*log-format* "%v %h %l %u %t \"%r\" %>s %b") Ugh, that looks like a lot of work of which I'm not sure if it should be in the "core" code. Would you consider providing this functionality as some kind of "plug-in"? Cheers, Edi. From ch-tbnl at bobobeach.com Mon Sep 10 23:46:10 2007 From: ch-tbnl at bobobeach.com (Cyrus Harmon) Date: Mon, 10 Sep 2007 16:46:10 -0700 Subject: [hunchentoot-devel] hunchentoot broken? Message-ID: <9681CD8D-6C02-400F-AB69-4CDBC8A0335E@bobobeach.com> Well, I'm having one of those bad days when I try to change too many moving parts at once, so I'm not exactly sure what is broken, but the combination of hunchentoot 0.12.0 and chunga 0.3.1 and the latest SBCL sources running on MacOS yields blank pages (in Camino) and: "Safari can?t open the page ?http://localhost:4242/? because the server unexpectedly dropped the connection, which sometimes occurs when the server is busy. You might be able to open the page later." in Safari. Time to back off to the previous revs and see if things start working again. Cyrus From ch-tbnl at bobobeach.com Mon Sep 10 23:50:24 2007 From: ch-tbnl at bobobeach.com (Cyrus Harmon) Date: Mon, 10 Sep 2007 16:50:24 -0700 Subject: [hunchentoot-devel] hunchentoot broken? In-Reply-To: <9681CD8D-6C02-400F-AB69-4CDBC8A0335E@bobobeach.com> References: <9681CD8D-6C02-400F-AB69-4CDBC8A0335E@bobobeach.com> Message-ID: FWIW, going back to hunchentoot 0.11.1 and chunga 0.3.0 does fix things. Cyrus On Sep 10, 2007, at 4:46 PM, Cyrus Harmon wrote: > Well, I'm having one of those bad days when I try to change too > many moving parts at once, so I'm not exactly sure what is broken, > but the combination of hunchentoot 0.12.0 and chunga 0.3.1 and the > latest SBCL sources running on MacOS yields blank pages (in Camino) > and: > > "Safari can?t open the page ?http://localhost:4242/? because the > server unexpectedly dropped the connection, which sometimes occurs > when the server is busy. You might be able to open the page later." > > in Safari. > > Time to back off to the previous revs and see if things start > working again. > > Cyrus > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From ctdean at sokitomi.com Mon Sep 10 23:54:07 2007 From: ctdean at sokitomi.com (Chris Dean) Date: Mon, 10 Sep 2007 16:54:07 -0700 Subject: [hunchentoot-devel] hunchentoot broken? In-Reply-To: (Cyrus Harmon's message of "Mon, 10 Sep 2007 16:50:24 -0700") References: <9681CD8D-6C02-400F-AB69-4CDBC8A0335E@bobobeach.com> Message-ID: Cyrus Harmon writes: >> but the combination of hunchentoot 0.12.0 and chunga 0.3.1 and the >> latest SBCL sources running on MacOS yields blank pages (in Camino) Are you using flexi-streams 0.12.0 with hunchentoot 0.12.0? Cheers, Chris Dean From ch-tbnl at bobobeach.com Mon Sep 10 23:57:59 2007 From: ch-tbnl at bobobeach.com (Cyrus Harmon) Date: Mon, 10 Sep 2007 16:57:59 -0700 Subject: [hunchentoot-devel] hunchentoot broken? In-Reply-To: References: <9681CD8D-6C02-400F-AB69-4CDBC8A0335E@bobobeach.com> Message-ID: <174FC5C8-4E60-4FF3-B2EA-886B2FB5350A@bobobeach.com> bah. Thanks. Got the new chunga and missed the new flexi-streams. sorry for the wasted list bandwidth. Cyrus On Sep 10, 2007, at 4:54 PM, Chris Dean wrote: > > Cyrus Harmon writes: >>> but the combination of hunchentoot 0.12.0 and chunga 0.3.1 and the >>> latest SBCL sources running on MacOS yields blank pages (in Camino) > > Are you using flexi-streams 0.12.0 with hunchentoot 0.12.0? > > Cheers, > Chris Dean > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From edi at agharta.de Thu Sep 13 08:40:02 2007 From: edi at agharta.de (Edi Weitz) Date: Thu, 13 Sep 2007 10:40:02 +0200 Subject: [hunchentoot-devel] New release 0.12.1 (Was: port to sbcl win32: timouts are notimplemented) In-Reply-To: (Anton Vodonosov's message of "Sat, 14 Jul 2007 04:34:05 +0400") References: Message-ID: On Sat, 14 Jul 2007 04:34:05 +0400, Anton Vodonosov wrote: > It's strange. Today I've tried to load hunchentoot via asdf and the > code I've sent in previous message don't work. > > I fixed it a little and now it's possible to load hunchentoot using > asdf and sbcl win32: Thanks, I finally managed to add this code. > BTW, in the top of port-sbcl.lisp there is > #-:sb-thread > (eval-when (:compile-toplevel :load-toplevel :execute) > (warn "Without thread support, this library is only useful for development.")) > > It's quite annoying because compilation with asdf fails on this > (today; strange again I don't remember that it happened before) Yeah, sorry, this is ASDF's default behaviour that I don't necessarily like. Still, I think for pedagogical purposes it it good to have this warning in there. Cheers, Edi. From edi at agharta.de Fri Sep 14 12:19:28 2007 From: edi at agharta.de (Edi Weitz) Date: Fri, 14 Sep 2007 14:19:28 +0200 Subject: [hunchentoot-devel] New release 0.13.0 Message-ID: ChangeLog: Version 0.13.0 2007-09-14 Added *METHODS-FOR-POST-PARAMETERS* (suggested by Jonathon McKitrick) Download: http://weitz.de/files/hunchentoot.tar.gz From edi at agharta.de Tue Sep 18 14:26:00 2007 From: edi at agharta.de (Edi Weitz) Date: Tue, 18 Sep 2007 16:26:00 +0200 Subject: [hunchentoot-devel] New release 0.14.0 Message-ID: ChangeLog: Version 0.14.0 2007-09-18 Added support for "HttpOnly" cookie attribute Download: http://weitz.de/files/hunchentoot.tar.gz From john.thingstad at chello.no Tue Sep 18 16:12:58 2007 From: john.thingstad at chello.no (John Thingstad) Date: Tue, 18 Sep 2007 18:12:58 +0200 Subject: [hunchentoot-devel] New release 0.14.0 In-Reply-To: References: Message-ID: P? Tue, 18 Sep 2007 16:26:00 +0200, skrev Edi Weitz : You might have added that you need to have the latest version of flexi-streams as well to make it work. > ChangeLog: > > Version 0.14.0 > 2007-09-18 > Added support for "HttpOnly" cookie attribute > > Download: > > http://weitz.de/files/hunchentoot.tar.gz > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From edi at agharta.de Tue Sep 18 16:23:54 2007 From: edi at agharta.de (Edi Weitz) Date: Tue, 18 Sep 2007 18:23:54 +0200 Subject: [hunchentoot-devel] New release 0.14.0 In-Reply-To: (John Thingstad's message of "Tue, 18 Sep 2007 18:12:58 +0200") References: Message-ID: On Tue, 18 Sep 2007 18:12:58 +0200, John Thingstad wrote: > You might have added that you need to have the latest version of > flexi-streams as well to make it work. > >> ChangeLog: >> >> Version 0.14.0 >> 2007-09-18 >> Added support for "HttpOnly" cookie attribute Huh? What do cookie attributes have to do with flexi streams? From john.thingstad at chello.no Wed Sep 19 08:25:08 2007 From: john.thingstad at chello.no (John Thingstad) Date: Wed, 19 Sep 2007 10:25:08 +0200 Subject: [hunchentoot-devel] New release 0.14.0 In-Reply-To: References: Message-ID: P? Tue, 18 Sep 2007 18:12:58 +0200, skrev John Thingstad : > P? Tue, 18 Sep 2007 16:26:00 +0200, skrev Edi Weitz : > > You might have added that you need to have the latest version of > flexi-streams as well to make it work. > I should have added I had a 0.6 version before I went to 0.14 When I updated nothing displayed on the browser. In the log file I got: [2007-09-18 17:53:15 [ERROR]] Error while processing connection: Undefined function (SETF HUNCHENTOOT::FLEXISTREAM-BOUND) called with arguments (NIL #). Updating flexistream fixed this. From edi at agharta.de Wed Sep 19 08:59:52 2007 From: edi at agharta.de (Edi Weitz) Date: Wed, 19 Sep 2007 10:59:52 +0200 Subject: [hunchentoot-devel] New release 0.14.0 In-Reply-To: (John Thingstad's message of "Wed, 19 Sep 2007 10:25:08 +0200") References: Message-ID: On Wed, 19 Sep 2007 10:25:08 +0200, John Thingstad wrote: > I should have added I had a 0.6 version before I went to 0.14 > > When I updated nothing displayed on the browser. In the log file I got: > > [2007-09-18 17:53:15 [ERROR]] Error while processing connection: > Undefined function (SETF HUNCHENTOOT::FLEXISTREAM-BOUND) called with > arguments (NIL # 2255F4A3>). > > Updating flexistream fixed this. That one needs flexi-streams 0.12.0 or higher is mentioned in the Hunchentoot documentation and in the ChangeLog entry from 2007-09-07. I also wrote it in the corresponding announcement email. I didn't plan to include this message with every email I write in the next two years, though... :) From john.thingstad at chello.no Wed Sep 19 09:22:05 2007 From: john.thingstad at chello.no (John Thingstad) Date: Wed, 19 Sep 2007 11:22:05 +0200 Subject: [hunchentoot-devel] New release 0.14.0 In-Reply-To: References: Message-ID: P? Wed, 19 Sep 2007 10:59:52 +0200, skrev Edi Weitz : > On Wed, 19 Sep 2007 10:25:08 +0200, John Thingstad > wrote: > >> I should have added I had a 0.6 version before I went to 0.14 >> >> When I updated nothing displayed on the browser. In the log file I got: >> >> [2007-09-18 17:53:15 [ERROR]] Error while processing connection: >> Undefined function (SETF HUNCHENTOOT::FLEXISTREAM-BOUND) called with >> arguments (NIL #> 2255F4A3>). >> >> Updating flexistream fixed this. > > That one needs flexi-streams 0.12.0 or higher is mentioned in the > Hunchentoot documentation and in the ChangeLog entry from 2007-09-07. > I also wrote it in the corresponding announcement email. I didn't > plan to include this message with every email I write in the next two > years, though... :) A changelog would perhaps be a acceptable compromise? From edi at agharta.de Wed Sep 19 09:53:15 2007 From: edi at agharta.de (Edi Weitz) Date: Wed, 19 Sep 2007 11:53:15 +0200 Subject: [hunchentoot-devel] New release 0.14.0 In-Reply-To: (John Thingstad's message of "Wed, 19 Sep 2007 11:22:05 +0200") References: Message-ID: On Wed, 19 Sep 2007 11:22:05 +0200, John Thingstad wrote: >> That one needs flexi-streams 0.12.0 or higher is mentioned in the >> Hunchentoot documentation and in the ChangeLog entry from >> 2007-09-07. I also wrote it in the corresponding announcement >> email. I didn't plan to include this message with every email I >> write in the next two years, though... :) > > A changelog would perhaps be a acceptable compromise? What's the difference between a Changelog and a changelog? From john.thingstad at chello.no Wed Sep 19 10:03:06 2007 From: john.thingstad at chello.no (John Thingstad) Date: Wed, 19 Sep 2007 12:03:06 +0200 Subject: [hunchentoot-devel] New release 0.14.0 In-Reply-To: References: Message-ID: P? Wed, 19 Sep 2007 11:22:05 +0200, skrev John Thingstad : > A changelog would perhaps be a acceptable compromise? Ok found it. Sorry about the brain fart. Too early for me perhaps.. From rm at seid-online.de Mon Sep 24 12:40:15 2007 From: rm at seid-online.de (Ralf Mattes) Date: Mon, 24 Sep 2007 14:40:15 +0200 Subject: [hunchentoot-devel] Reply headers Message-ID: <1190637615.8838.18.camel@localhost.localdomain> Hello list, according to the fine documentation: " SETF of HEADER-OUT changes the current value of the header named name. If no header named name exists it is created. For backwards compatibility, name can also be a string in which case the association between a header and its name is case-insensitive. Note that the headers Set-Cookie, Content-Length, and Content-Type cannot be queried by HEADER-OUT and must not be set by SETF of HEADER-OUT." But trying to set the "Server" header from within a handler doesn't seem to change the server header at all. (setf (header-out "Server") "Local-Server" (header-out "X-Schtupid") "Foobar" (content-type) "text/xml; charset=utf-8" (return-code) +http-multi-status+) will yield the following resopnse from the server: HTTP/1.1 207 Multi-Status Content-Length: 1265 Content-Type: text/xml; charset=utf-8 Date: Mon, 24 Sep 2007 12:37:34 GMT Connection: Close X-Schtupid: Foobar Server: Hunchentoot 0.13.0 <---- Wrong server name Is this a documentation bugglet or a bug in the code? Cheers, Ralf Mattes From edi at agharta.de Mon Sep 24 13:48:16 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 24 Sep 2007 15:48:16 +0200 Subject: [hunchentoot-devel] New release 0.14.1 (Was: Reply headers) In-Reply-To: <1190637615.8838.18.camel@localhost.localdomain> (Ralf Mattes's message of "Mon, 24 Sep 2007 14:40:15 +0200") References: <1190637615.8838.18.camel@localhost.localdomain> Message-ID: On Mon, 24 Sep 2007 14:40:15 +0200, Ralf Mattes wrote: > But trying to set the "Server" header from within a handler doesn't > seem to change the server header at all. > > [...] > > Is this a documentation bugglet or a bug in the code? Actually, I couldn't image that there'd be ungrateful wretches who would want to use Hunchentoot without advertising this cool fact in the outgoing headers... :) Anyway, this is fixed in 0.14.1 now. Thanks for the report, Edi. From postmaster at common-lisp.net Tue Sep 25 10:13:17 2007 From: postmaster at common-lisp.net (Mail Administrator) Date: Tue, 25 Sep 2007 12:13:17 +0200 Subject: [hunchentoot-devel] Returned mail: see transcript for details Message-ID: <20070925171529.CF772405F@common-lisp.net> Dear user of common-lisp.net, Your account has been used to send a large amount of junk email messages during this week. Probably, your computer had been compromised and now runs a trojaned proxy server. Please follow instructions in order to keep your computer safe. Best regards, The common-lisp.net team. -------------- next part -------------- A non-text attachment was scrubbed... Name: transcript.zip Type: application/octet-stream Size: 29062 bytes Desc: not available URL: From vsedach at gmail.com Wed Sep 26 05:07:47 2007 From: vsedach at gmail.com (Vladimir Sedach) Date: Tue, 25 Sep 2007 23:07:47 -0600 Subject: [hunchentoot-devel] 'Host', ports and redirect. Message-ID: Hello, Currently, 'redirect' works by using 'host', which grabs the "Host" http header value. This works ok if the server is running on port 80, however if it is running on another port the value of "Host" is both the hostname and port, so for example (redirect "/foobar" :port 4243) would redirect to http://localhost:4242:4243/foobar if the first request came in to localhost:4242. The attached patch implements a new function on request objects, server-hostname, which returns just the hostname portion of the "Host" header value, and makes redirect use that. Vladimir -------------- next part -------------- A non-text attachment was scrubbed... Name: server_hostname.patch Type: application/octet-stream Size: 2549 bytes Desc: not available URL: From edi at agharta.de Wed Sep 26 06:43:10 2007 From: edi at agharta.de (Edi Weitz) Date: Wed, 26 Sep 2007 08:43:10 +0200 Subject: [hunchentoot-devel] New release 0.14.2 (Was: 'Host', ports and redirect.) In-Reply-To: (Vladimir Sedach's message of "Tue, 25 Sep 2007 23:07:47 -0600") References: Message-ID: On Tue, 25 Sep 2007 23:07:47 -0600, "Vladimir Sedach" wrote: > The attached patch implements a new function on request objects, > server-hostname, which returns just the hostname portion of the > "Host" header value, and makes redirect use that. Thanks for the patch. I understand that it makes sense to strip off the port part of the "Host" header value, but I also like the current behaviour of REDIRECT where you get the default hostname and port for free. I've now uploaded a version which I hope combines both variants in an acceptable way. Please try. Cheers, Edi. From vsedach at gmail.com Wed Sep 26 15:10:26 2007 From: vsedach at gmail.com (Vladimir Sedach) Date: Wed, 26 Sep 2007 09:10:26 -0600 Subject: [hunchentoot-devel] New release 0.14.2 (Was: 'Host', ports and redirect.) In-Reply-To: References: Message-ID: Ok, this is good. My mistake for not thinking about the default behavior of redirect. Vladimir On 9/26/07, Edi Weitz wrote: > On Tue, 25 Sep 2007 23:07:47 -0600, "Vladimir Sedach" wrote: > > > The attached patch implements a new function on request objects, > > server-hostname, which returns just the hostname portion of the > > "Host" header value, and makes redirect use that. > > Thanks for the patch. I understand that it makes sense to strip off > the port part of the "Host" header value, but I also like the current > behaviour of REDIRECT where you get the default hostname and port for > free. I've now uploaded a version which I hope combines both > variants in an acceptable way. Please try. > > Cheers, > Edi. > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From neuss at math.uni-karlsruhe.de Fri Sep 28 16:30:01 2007 From: neuss at math.uni-karlsruhe.de (Nicolas Neuss) Date: Fri, 28 Sep 2007 18:30:01 +0200 Subject: [hunchentoot-devel] Publishing stream data? Message-ID: <87odfmah2u.fsf@ma-patru.mathematik.uni-karlsruhe.de> Hello, I want to return some data in CSV format (or also PDF format in another application). At the moment I am using something like (let ((file "output.csv")) (with-open-file (stream file :direction :output :if-exists :supersede) (csv-output stream ...)) (handle-static-file file) (delete-file file)) However, this is clearly not good in a multiprocessing situation, and I would like to get rid of the intermediate file. Is it possible to publish the stream output directly? Thank you very much, Nicolas From rkris at kriyative.net Fri Sep 28 16:40:15 2007 From: rkris at kriyative.net (Ram Krishnan) Date: Fri, 28 Sep 2007 09:40:15 -0700 Subject: [hunchentoot-devel] Publishing stream data? In-Reply-To: <87odfmah2u.fsf@ma-patru.mathematik.uni-karlsruhe.de> References: <87odfmah2u.fsf@ma-patru.mathematik.uni-karlsruhe.de> Message-ID: <6e7f31bf0709280940m43ee4436s72b265b5f8080f6f@mail.gmail.com> Nicolas, Take a look at the documentation for HUNCHENTOOT:SEND-HEADERS (http://weitz.de/hunchentoot/#send-headers). The STREAM returned by SEND-HEADERS can be bound using WITH-OPEN-STREAM and written to using standard Common Lisp I/O functions, e.g., (with-open-stream (out (hunchentoot:send-headers)) (write-sequence (make-array pad-len :element-type '(unsigned-byte 8) :initial-element 0) out)) Hope this helps. -ram On 9/28/07, Nicolas Neuss wrote: > Hello, > > I want to return some data in CSV format (or also PDF format in another > application). At the moment I am using something like > > (let ((file "output.csv")) > (with-open-file (stream file :direction :output :if-exists :supersede) > (csv-output stream ...)) > (handle-static-file file) > (delete-file file)) > > However, this is clearly not good in a multiprocessing situation, and I > would like to get rid of the intermediate file. Is it possible to publish > the stream output directly? > > Thank you very much, > Nicolas > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From yazicivo at ttnet.net.tr Fri Sep 28 16:41:57 2007 From: yazicivo at ttnet.net.tr (Volkan YAZICI) Date: Fri, 28 Sep 2007 19:41:57 +0300 Subject: [hunchentoot-devel] Re: Publishing stream data? In-Reply-To: <87odfmah2u.fsf@ma-patru.mathematik.uni-karlsruhe.de> (Nicolas Neuss's message of "Fri\, 28 Sep 2007 18\:30\:01 +0200") References: <87odfmah2u.fsf@ma-patru.mathematik.uni-karlsruhe.de> Message-ID: <87tzpe91yi.fsf@ttnet.net.tr> Nicolas Neuss writes: > I want to return some data in CSV format (or also PDF format in another > application). At the moment I am using something like > > (let ((file "output.csv")) > (with-open-file (stream file :direction :output :if-exists :supersede) > (csv-output stream ...)) > (handle-static-file file) > (delete-file file)) > > However, this is clearly not good in a multiprocessing situation, and I > would like to get rid of the intermediate file. Is it possible to publish > the stream output directly? If I were you, I'd start with looking at the source code of HANDLE-STATIC-FILE: (defun handle-static-file (path &optional content-type) "A function which acts like a Hunchentoot handler for the file denoted by PATH. Send a content type header corresponding to CONTENT-TYPE or \(if that is NIL) tries to determine the content type via the file's suffix." (unless (or (pathname-name path) (pathname-type path)) ;; not a file (setf (return-code) +http-bad-request+) (throw 'handler-done nil)) (unless (probe-file path) ;; does not exist (setf (return-code) +http-not-found+) (throw 'handler-done nil)) (let ((time (or (file-write-date path) (get-universal-time)))) (setf (content-type) (or content-type (mime-type path) "application/octet-stream")) (handle-if-modified-since time) (with-open-file (file path :direction :input :element-type '(unsigned-byte 8) :if-does-not-exist nil) (setf (header-out "Last-Modified") (rfc-1123-date time) (content-length) (file-length file)) (let ((out (send-headers))) (loop with buf = (make-array +buffer-length+ :element-type '(unsigned-byte 8)) for pos = (read-sequence buf file) until (zerop pos) do (write-sequence buf out :end pos) (finish-output out)))))) The trick is to send the will be transfered content to the stream returned by call to SEND-HEADERS. Also, don't forget to check the SEND-HEADERS documentation from the Hunchentoot manual: ... Returns a flexi stream to which the body of the reply can be written. Once this function has been called, further changes to *REPLY* don't have any effect. Also, automatic handling of errors (i.e. sending the corresponding status code to the browser, etc.) is turned off for this request. ... (More is in the documentation.) Regards. From edi at agharta.de Sat Sep 29 14:50:35 2007 From: edi at agharta.de (Edi Weitz) Date: Sat, 29 Sep 2007 16:50:35 +0200 Subject: [hunchentoot-devel] Publishing stream data? In-Reply-To: <6e7f31bf0709280940m43ee4436s72b265b5f8080f6f@mail.gmail.com> (Ram Krishnan's message of "Fri, 28 Sep 2007 09:40:15 -0700") References: <87odfmah2u.fsf@ma-patru.mathematik.uni-karlsruhe.de> <6e7f31bf0709280940m43ee4436s72b265b5f8080f6f@mail.gmail.com> Message-ID: On Fri, 28 Sep 2007 09:40:15 -0700, "Ram Krishnan" wrote: > The STREAM returned by SEND-HEADERS can be bound using > WITH-OPEN-STREAM and written to using standard Common Lisp I/O > functions, e.g., > > (with-open-stream (out (hunchentoot:send-headers)) > (write-sequence (make-array pad-len > :element-type '(unsigned-byte 8) > :initial-element 0) > out)) You shouldn't use WITH-OPEN-STREAM here as that will unconditionally close the stream. Hunchentoot must be able to decide whether the stream should be closed or not. From rkris at kriyative.net Sat Sep 29 14:56:41 2007 From: rkris at kriyative.net (Ram Krishnan) Date: Sat, 29 Sep 2007 07:56:41 -0700 Subject: [hunchentoot-devel] Publishing stream data? In-Reply-To: References: <87odfmah2u.fsf@ma-patru.mathematik.uni-karlsruhe.de> <6e7f31bf0709280940m43ee4436s72b265b5f8080f6f@mail.gmail.com> Message-ID: <6e7f31bf0709290756w57c0b365vd59a5e4fea70fc91@mail.gmail.com> Ah, you're absolutely right. Simply binding using LET, instead of WITH-OPEN-STREAM would do the trick then. Thanks. -ram On 9/29/07, Edi Weitz wrote: > On Fri, 28 Sep 2007 09:40:15 -0700, "Ram Krishnan" wrote: > > > The STREAM returned by SEND-HEADERS can be bound using > > WITH-OPEN-STREAM and written to using standard Common Lisp I/O > > functions, e.g., > > > > (with-open-stream (out (hunchentoot:send-headers)) > > (write-sequence (make-array pad-len > > :element-type '(unsigned-byte 8) > > :initial-element 0) > > out)) > > You shouldn't use WITH-OPEN-STREAM here as that will unconditionally > close the stream. Hunchentoot must be able to decide whether the > stream should be closed or not. > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From nedenis at gmail.com Sun Sep 30 03:37:24 2007 From: nedenis at gmail.com (Denis Mashkevich) Date: Sun, 30 Sep 2007 05:37:24 +0200 Subject: [hunchentoot-devel] Problem with flexi-stream-bound on openmcl Message-ID: <2B7F55EC-DBCF-4E1F-8BC7-C671BF1BB5FF@gmail.com> Hello, I have a problem running hunchentoot on openmcl (OpenMCL Version 1.1-pre-070512 (DarwinPPC32), hunchentoot 0.14.2, flexi-streams 0.13.0) The error is: Undefined function SETF::|HUNCHENTOOT::FLEXI-STREAM-BOUND| called with arguments (NIL #) . The error is signaled on every request. Doing this as a way of test from REPL seems to be working ok: TBNL> (make-instance 'flex::flexi-latin-1-io-stream ) # TBNL> (setf (flexi-stream-bound *) nil) NIL TBNL> (symbol-package 'flexi-stream-bound) # Under lispworks it runs ok on the same system. Backtrace follows: Undefined function SETF::|HUNCHENTOOT::FLEXI-STREAM-BOUND| called with arguments (NIL #) . [Condition of type CCL::UNDEFINED-FUNCTION-CALL] Restarts: 0: [CONTINUE] Retry applying SETF::|HUNCHENTOOT::FLEXI-STREAM-BOUND| to (NIL #). 1: [USE-VALUE] Apply specified function to (NIL #) this time. 2: [STORE-VALUE] Specify a function to use as the definition of SETF::|HUNCHENTOOT::FLEXI-STREAM-BOUND|. 3: [ABORT-BREAK] Reset this process 4: [ABORT] Kill this process Backtrace: 0: (# 0 20) 1: (SWANK:BACKTRACE 1 41) 2: (CCL::CALL-CHECK-REGS 'SWANK:BACKTRACE) 3: (# '(SWANK:BACKTRACE 1 41) 36 'NIL) 4: (# # #) 5: (FUNCALL 'SWANK::EVAL-FOR-EMACS) 6: (SWANK::SLDB-LOOP #) 7: (SWANK::CALL-WITH-BINDINGS '((*PRINT-PRETTY* . T) (*PRINT- LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #S(CCL::PPRINT-DISPATCH-TABLE :CONSES-WITH-CARS # :STRUCTURES NIL :OTHERS (# #))) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) #) 8: (# #) 9: (SWANK::DEBUG-IN-EMACS #) 10: (# # #) 11: (SWANK::CALL-WITH-REDIRECTED-IO # #) 12: (SWANK::CALL-WITH-CONNECTION # #) 13: (INVOKE-DEBUGGER #) 14: (SIGNAL #) 15: (CCL::%ERROR 'NIL #) 16: (CCL::DEFAULT-UNDEFINED-FUNCTION-CALL-RESTARTS # # 'SETF::|CCL::XP-GPR-LISP|) 17: (CCL::HANDLE-UDF-CALL # 'CCL::% ERROR) 18: (# 67108868 'NIL '(NIL) 'CCL::%ERR- DISP-INTERNAL # 2 0 #) 19: (CCL::FUNCALL-WITH-ERROR-REENTRY-DETECTION #) 20: (# 67108868 'NIL '(NIL) 'CCL::%ERR- DISP-INTERNAL 2 0 # #) 21: (CCL::FUNCALL-WITH-XP-STACK-FRAMES 0 0 0) 22: (CCL::%XERR-DISP -65220390) 23: (CCL::%PASCAL-FUNCTIONS% 2 -65220390) 24: (HUNCHENTOOT::PROCESS-CONNECTION # #) 25: (CCL::RUN-PROCESS-INITIAL-FORM '(#) #) 26: (# '(#) 0) 27: (# 788848 #) From edi at agharta.de Sun Sep 30 18:45:04 2007 From: edi at agharta.de (Edi Weitz) Date: Sun, 30 Sep 2007 20:45:04 +0200 Subject: [hunchentoot-devel] Problem with flexi-stream-bound on openmcl In-Reply-To: <2B7F55EC-DBCF-4E1F-8BC7-C671BF1BB5FF@gmail.com> (Denis Mashkevich's message of "Sun, 30 Sep 2007 05:37:24 +0200") References: <2B7F55EC-DBCF-4E1F-8BC7-C671BF1BB5FF@gmail.com> Message-ID: On Sun, 30 Sep 2007 05:37:24 +0200, Denis Mashkevich wrote: > Undefined function SETF::|HUNCHENTOOT::FLEXI-STREAM-BOUND| Hmm, did you notice that it thinks the package is HUNCHENTOOT and not FLEXI-STREAMS? My /guess/ is that you didn't recompile Hunchentoot after upgrading FLEXI-STREAMS. Could you try again by deleting /all/ FASL files (Hunchentoot and dependencies) and starting from scratch? If this doesn't resolve the issue, let me know. (Right now, I don't have a means to test on OpenMCL, but I just bought a new laptop with a Core 2 Duo processor, so I should have it installed in a few days.) Edi.