From edi at agharta.de Mon Oct 1 08:08:46 2007 From: edi at agharta.de (Edi Weitz) Date: Mon, 01 Oct 2007 10:08:46 +0200 Subject: [drakma-devel] New release 0.11.0 (Was: Drakma and content-type) In-Reply-To: <5aea26870709301426h406f328cx98eb845d1788fbc9@mail.gmail.com> (Peter Eddy's message of "Sun, 30 Sep 2007 17:26:33 -0400") References: <5aea26870709301426h406f328cx98eb845d1788fbc9@mail.gmail.com> Message-ID: On Sun, 30 Sep 2007 17:26:33 -0400, "Peter Eddy" wrote: > I've spent some time today converting some code (cl-s3) to use > drakma instead of s-http-client. In the process, one thing I thought > might be useful in drakma is a caller-defined way of indicating that > the content type is text or not. For example, a function like the > following passed to (http-request) > > (defun text-content-type-p (type subtype) ..) > > Or perhaps some table of text content types defined as a special > var. I know the caller could implement this themselves, but it seems > like doing so might require the re-implementation of portions of > http-request that deal with the charset and chunked incoding > (i.e. the code within (when (and (string-equal type "text"). > > Do you think this makes sense, or am I'm missing something? [Please use the mailing list to discuss Drakma.] Yes, that sounds like a reasonable request and I was planning to add something like that anyway. Please check if the new release provides what you need. Cheers, Edi. From ross at sourcelabs.com Tue Oct 2 05:44:14 2007 From: ross at sourcelabs.com (Ross Jekel) Date: Mon, 1 Oct 2007 22:44:14 -0700 (PDT) Subject: [drakma-devel] utf-8 question In-Reply-To: Message-ID: <278250439.53301191303854664.JavaMail.root@mail-101.colo.sourcelabs.com> To the best of my knowledge, the two attached patches should work on all common lisp implementations. Basically I just added an "as-keyword" function to the util.lisp of both chunga and drakma that checks the readtable-case and uses #'string-upcase to convert the string if it is :upcase, otherwise it uses #'string-downcase (since the symbols in your source files are typically typed in all lowercase). The two places (one in chunga read.lisp and one in drakma request.lisp) that call (intern (string-upcase ..) :keyword) were replaced with the (as-keyword ) form. I've attached the diff -u output trying to follow your patching rules. If the attachment doesn't go through, I'll paste the patches in. Ross ----- Original Message ----- From: "Edi Weitz" To: "General interest list for Drakma and Chunga" Sent: Sunday, September 30, 2007 11:37:46 AM (GMT-0800) America/Los_Angeles Subject: Re: [drakma-devel] utf-8 question On Sun, 30 Sep 2007 10:40:24 -0700 (PDT), Ross Jekel wrote: > I'm using Allegro CL in case-sensitive modern mode (the > default). There are several places in chunga and drakma that might > do something like (intern (string-upper somevalue) :keyword) making > uppercase symbols such as :CONTENT-TYPE for headers or :UTF-8 for > encoding types. If there is any code that compares against the > lower-case symbol (such as :content-type in get-content-type in > drakma/read.lisp), the match fails. Ah, good, thanks for the analysis. I myself have never used "modern mode" and I don't really care about it, so I won't "fix" this myself, but if someone is interested in doing it, I'll gladly accept clean patches, of course. http://weitz.de/patches.html Thanks again, Edi. _______________________________________________ drakma-devel mailing list drakma-devel at common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: drakma.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: chunga.txt URL: From edi at agharta.de Thu Oct 11 07:05:24 2007 From: edi at agharta.de (Edi Weitz) Date: Thu, 11 Oct 2007 09:05:24 +0200 Subject: [drakma-devel] New releases 0.10.3 (Drakma) and 0.4.1 (Chunga) (Was: utf-8 question) In-Reply-To: <278250439.53301191303854664.JavaMail.root@mail-101.colo.sourcelabs.com> (Ross Jekel's message of "Mon, 1 Oct 2007 22:44:14 -0700 (PDT)") References: <278250439.53301191303854664.JavaMail.root@mail-101.colo.sourcelabs.com> Message-ID: On Mon, 1 Oct 2007 22:44:14 -0700 (PDT), Ross Jekel wrote: > To the best of my knowledge, the two attached patches should work on > all common lisp implementations. Basically I just added an > "as-keyword" function to the util.lisp of both chunga and drakma > that checks the readtable-case and uses #'string-upcase to convert > the string if it is :upcase, otherwise it uses #'string-downcase > (since the symbols in your source files are typically typed in all > lowercase). > > The two places (one in chunga read.lisp and one in drakma > request.lisp) that call (intern (string-upcase ..) :keyword) were > replaced with the (as-keyword ) form. > > I've attached the diff -u output trying to follow your patching rules. Thanks and sorry for the delay. This is now in the latest releases - see subject line. If you're using "modern mode", you should also update FLEXI-STREAMS. Cheers, Edi. From ivan at toshkov.org Thu Oct 11 08:43:10 2007 From: ivan at toshkov.org (Ivan Toshkov) Date: Thu, 11 Oct 2007 11:43:10 +0300 Subject: [drakma-devel] New releases 0.10.3 (Drakma) and 0.4.1 (Chunga) (Was: utf-8 question) In-Reply-To: References: <278250439.53301191303854664.JavaMail.root@mail-101.colo.sourcelabs.com> Message-ID: <7c23adaa0710110143s67825b94he6d9268a524a124d@mail.gmail.com> Hmm, it's strange, because you've released drakma 0.11.0 on 1 October. The changelog entry stated: Version 0.11.0 2007-10-01 Added *TEXT-CONTENT-TYPES* and *BODY-FORMAT-FUNCTION* (suggested by Peter Eddy) Now, this is gone. On 10/11/07, Edi Weitz wrote: > On Mon, 1 Oct 2007 22:44:14 -0700 (PDT), Ross Jekel wrote: > > > To the best of my knowledge, the two attached patches should work on > > all common lisp implementations. Basically I just added an > > "as-keyword" function to the util.lisp of both chunga and drakma > > that checks the readtable-case and uses #'string-upcase to convert > > the string if it is :upcase, otherwise it uses #'string-downcase > > (since the symbols in your source files are typically typed in all > > lowercase). > > > > The two places (one in chunga read.lisp and one in drakma > > request.lisp) that call (intern (string-upcase ..) :keyword) were > > replaced with the (as-keyword ) form. > > > > I've attached the diff -u output trying to follow your patching rules. > > Thanks and sorry for the delay. This is now in the latest releases - > see subject line. If you're using "modern mode", you should also > update FLEXI-STREAMS. > > Cheers, > Edi. > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > -- "...Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical CAD, Modeling and Simulation, Natural Language, Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web Authoring just because these are the only things they happened to list." -- Kent Pitman From edi at agharta.de Thu Oct 11 08:50:59 2007 From: edi at agharta.de (Edi Weitz) Date: Thu, 11 Oct 2007 10:50:59 +0200 Subject: [drakma-devel] New release 0.11.1 (Was: New releases 0.10.3 (Drakma) and 0.4.1 (Chunga)) In-Reply-To: <7c23adaa0710110143s67825b94he6d9268a524a124d@mail.gmail.com> (Ivan Toshkov's message of "Thu, 11 Oct 2007 11:43:10 +0300") References: <278250439.53301191303854664.JavaMail.root@mail-101.colo.sourcelabs.com> <7c23adaa0710110143s67825b94he6d9268a524a124d@mail.gmail.com> Message-ID: On Thu, 11 Oct 2007 11:43:10 +0300, "Ivan Toshkov" wrote: > Hmm, it's strange, because you've released drakma 0.11.0 on 1 > October. Yes, sorry, S?bastien Saint-Sevin also just emailed me about this. I switched laptops recently and it seems I released 0.11.0 from the old one after I had already copied my repository to the new machine. Should be fixed now, i.e. 0.11.1 is online which includes the additions from both 0.11.0 and "0.10.3". Thanks to you both, Edi. From ross at sourcelabs.com Thu Oct 11 16:29:55 2007 From: ross at sourcelabs.com (Ross Jekel) Date: Thu, 11 Oct 2007 09:29:55 -0700 (PDT) Subject: [drakma-devel] New releases 0.10.3 (Drakma) and 0.4.1 (Chunga) (Was: utf-8 question) In-Reply-To: Message-ID: <2122161131.21431192120195722.JavaMail.root@mail-101.colo.sourcelabs.com> I didn't notice any need for this in FLEXI-STREAMS. Using grep it looks like the only place it interns is in the asd file: (funcall (intern (symbol-name :run-tests) (find-package :flexi-streams-test))) And this method of interning a symbol-name is portable in all casemodes as long as the cases of the typed in :run-tests and function definition name match. Is there something I'm missing? Thanks so much for creating this library. AServe's client does not use streams, which is annoying, and doesn't current support chunking with https requests (not a blocker because I could revert to http/1.0, but...). In a shop that is mostly Java programmers, you saved me from having to apologize for some embarrassingly silly work-arounds using the other library. I just recently replaced do-http-request from Aserve with http-request from Drakma in soap calls and it works great. Thank you! Ross ----- Original Message ----- From: "Edi Weitz" To: "General interest list for Drakma and Chunga" Sent: Thursday, October 11, 2007 12:05:24 AM (GMT-0800) America/Los_Angeles Subject: [drakma-devel] New releases 0.10.3 (Drakma) and 0.4.1 (Chunga) (Was: utf-8 question) On Mon, 1 Oct 2007 22:44:14 -0700 (PDT), Ross Jekel wrote: > To the best of my knowledge, the two attached patches should work on > all common lisp implementations. Basically I just added an > "as-keyword" function to the util.lisp of both chunga and drakma > that checks the readtable-case and uses #'string-upcase to convert > the string if it is :upcase, otherwise it uses #'string-downcase > (since the symbols in your source files are typically typed in all > lowercase). > > The two places (one in chunga read.lisp and one in drakma > request.lisp) that call (intern (string-upcase ..) :keyword) were > replaced with the (as-keyword ) form. > > I've attached the diff -u output trying to follow your patching rules. Thanks and sorry for the delay. This is now in the latest releases - see subject line. If you're using "modern mode", you should also update FLEXI-STREAMS. Cheers, Edi. _______________________________________________ drakma-devel mailing list drakma-devel at common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel From edi at agharta.de Thu Oct 11 18:56:19 2007 From: edi at agharta.de (Edi Weitz) Date: Thu, 11 Oct 2007 20:56:19 +0200 Subject: [drakma-devel] New releases 0.10.3 (Drakma) and 0.4.1 (Chunga) In-Reply-To: <2122161131.21431192120195722.JavaMail.root@mail-101.colo.sourcelabs.com> (Ross Jekel's message of "Thu, 11 Oct 2007 09:29:55 -0700 (PDT)") References: <2122161131.21431192120195722.JavaMail.root@mail-101.colo.sourcelabs.com> Message-ID: On Thu, 11 Oct 2007 09:29:55 -0700 (PDT), Ross Jekel wrote: > I didn't notice any need for this in FLEXI-STREAMS. Using grep it > looks like the only place it interns is in the asd file: > > (funcall (intern (symbol-name :run-tests) > (find-package :flexi-streams-test))) > > And this method of interning a symbol-name is portable in all > casemodes as long as the cases of the typed in :run-tests and > function definition name match. > > Is there something I'm missing? Look at the start of packages.lisp. > Thanks so much for creating this library. AServe's client does not > use streams, which is annoying, and doesn't current support chunking > with https requests (not a blocker because I could revert to > http/1.0, but...). In a shop that is mostly Java programmers, you > saved me from having to apologize for some embarrassingly silly > work-arounds using the other library. I just recently replaced > do-http-request from Aserve with http-request from Drakma in soap > calls and it works great. Thanks for the feedback, that's good to hear! Cheers, Edi. From ross at sourcelabs.com Thu Oct 11 19:48:08 2007 From: ross at sourcelabs.com (Ross Jekel) Date: Thu, 11 Oct 2007 12:48:08 -0700 (PDT) Subject: [drakma-devel] New releases 0.10.3 (Drakma) and 0.4.1 (Chunga) In-Reply-To: Message-ID: <1335259349.22851192132088862.JavaMail.root@mail-101.colo.sourcelabs.com> Ah yes, I hand edited that when asdf-install failed to compile it and I forgot about it. This works as a replacement: (unless (find-symbol (symbol-name :stream-file-position) :trivial-gray-streams) (error "You need a newer version of TRIVIAL-GRAY-STREAMS.")) Ross ----- Original Message ----- From: "Edi Weitz" To: "General interest list for Drakma and Chunga" Sent: Thursday, October 11, 2007 11:56:19 AM (GMT-0800) America/Los_Angeles Subject: Re: [drakma-devel] New releases 0.10.3 (Drakma) and 0.4.1 (Chunga) On Thu, 11 Oct 2007 09:29:55 -0700 (PDT), Ross Jekel wrote: > I didn't notice any need for this in FLEXI-STREAMS. Using grep it > looks like the only place it interns is in the asd file: > > (funcall (intern (symbol-name :run-tests) > (find-package :flexi-streams-test))) > > And this method of interning a symbol-name is portable in all > casemodes as long as the cases of the typed in :run-tests and > function definition name match. > > Is there something I'm missing? Look at the start of packages.lisp. > Thanks so much for creating this library. AServe's client does not > use streams, which is annoying, and doesn't current support chunking > with https requests (not a blocker because I could revert to > http/1.0, but...). In a shop that is mostly Java programmers, you > saved me from having to apologize for some embarrassingly silly > work-arounds using the other library. I just recently replaced > do-http-request from Aserve with http-request from Drakma in soap > calls and it works great. Thanks for the feedback, that's good to hear! Cheers, Edi. _______________________________________________ drakma-devel mailing list drakma-devel at common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel From lispercat at gmail.com Fri Oct 12 04:05:46 2007 From: lispercat at gmail.com (Andrei Stebakov) Date: Fri, 12 Oct 2007 00:05:46 -0400 Subject: [drakma-devel] http-request error... Message-ID: I run across this error time after time but it's really hard to reproduce but I can replicate exactly the same backtrace of the problem if instead of some valid http domain I choose any fake one. If I run: (drakma:http-request "http://some-fake-domain.com" :method :get :parameters `(("param1" . "text"))) The backtrace will be: The value 0 is not of type (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) (INTEGER 1)). [Condition of type TYPE-ERROR] Restarts: 0: [ABORT] Return to SLIME's top level. 1: [ABORT] Exit debugger, returning to top level. Backtrace: 0: (RANDOM 0) 1: (USOCKET::GET-RANDOM-HOST-BY-NAME "some-fake-domain.com") 2: (USOCKET:SOCKET-CONNECT "some-fake-domain.com" 80) 3: (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com") 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com" :METHOD :GET :PARAMETERS '(("param1" . "text"))) #) 5: ((LAMBDA ())) In my case it looks like sometimes even for the real domain it calls (RANDOM 0) which gives this log. Even if the domain is wrong do you think it should throw an exception? I use SBCL 1.0.5. with the latest drakma and usocket (usocket-0.3.2). Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Fri Oct 12 07:11:59 2007 From: edi at agharta.de (Edi Weitz) Date: Fri, 12 Oct 2007 09:11:59 +0200 Subject: [drakma-devel] http-request error... In-Reply-To: (Andrei Stebakov's message of "Fri, 12 Oct 2007 00:05:46 -0400") References: Message-ID: On Fri, 12 Oct 2007 00:05:46 -0400, "Andrei Stebakov" wrote: > I run across this error time after time but it's really hard to > reproduce but I can replicate exactly the same backtrace of the > problem if instead of some valid http domain I choose any fake one. > If I run: > (drakma:http-request > "http://some-fake-domain.com" > :method :get > :parameters `(("param1" . "text"))) > > The backtrace will be: > > The value 0 > is not of type > (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) (INTEGER 1)). > [Condition of type TYPE-ERROR] > > Restarts: > 0: [ABORT] Return to SLIME's top level. > 1: [ABORT] Exit debugger, returning to top level. > > Backtrace: > 0: (RANDOM 0) > 1: (USOCKET::GET-RANDOM-HOST-BY-NAME "some-fake-domain.com") > 2: (USOCKET:SOCKET-CONNECT "some-fake-domain.com" 80) > 3: (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com") > 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV > (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com" :METHOD :GET > :PARAMETERS '(("param1" . "text"))) > #) > 5: ((LAMBDA ())) > > In my case it looks like sometimes even for the real domain it calls > (RANDOM 0) which gives this log. Even if the domain is wrong do you > think it should throw an exception? I use SBCL 1.0.5. with the > latest drakma and usocket (usocket-0.3.2). I'm afraid this looks like a usocket problem and you should ask on their mailing list. Andreas Fuchs and others convinced me to switch Drakma from trivial-sockets to usocket, and one of their arguments was that trivial-sockets is unmaintained while usocket has an active developer community. So, you can now check if they were right... :) Cheers, Edi. From ehuels at gmail.com Fri Oct 12 07:37:27 2007 From: ehuels at gmail.com (Erik Huelsmann) Date: Fri, 12 Oct 2007 09:37:27 +0200 Subject: [drakma-devel] http-request error... In-Reply-To: References: Message-ID: On 10/12/07, Andrei Stebakov wrote: > I run across this error time after time but it's really hard to reproduce > but I can replicate exactly the same backtrace of the problem if instead of > some valid http domain I choose any fake one. > If I run: > (drakma:http-request > "http://some-fake-domain.com" > :method :get > :parameters `(("param1" . "text"))) > > The backtrace will be: > > The value 0 > is not of type > (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) (INTEGER 1)). > [Condition of type TYPE-ERROR] > > Restarts: > 0: [ABORT] Return to SLIME's top level. > 1: [ABORT] Exit debugger, returning to top level. > > Backtrace: > 0: (RANDOM 0) > 1: (USOCKET::GET-RANDOM-HOST-BY-NAME > "some-fake-domain.com") > 2: (USOCKET:SOCKET-CONNECT " some-fake-domain.com" 80) > 3: (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com") > 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV > (DRAKMA:HTTP-REQUEST " http://some-fake-domain.com" :METHOD :GET > :PARAMETERS '(("param1" . "text"))) > #) > 5: ((LAMBDA ())) > > In my case it looks like sometimes even for the real domain it calls (RANDOM > 0) which gives this log. > Even if the domain is wrong do you think it should throw an exception? > I use SBCL 1.0.5. with the latest drakma and usocket ( usocket-0.3.2). I'll have a look tonight, but I think I fixed this problem in newer usocket releases already. The newest usocket is 0.3.5. [After looking at the list of releases at the bottom of http://common-lisp.net/project/usocket/] I think your problem may have been fixed in usocket 0.3.3. (But again, I'll look at it later - tonight) bye, Erik. From Hit-Booster at common-lisp.net Sun Oct 14 05:42:23 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 13 Oct 2007 22:42:23 -0700 Subject: [drakma-devel] How to get free quality visitors to your website? Message-ID: <20071013224222.721E4C5A8DADBB74@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Feed at common-lisp.net Tue Oct 16 11:54:01 2007 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 16 Oct 2007 04:54:01 -0700 Subject: [drakma-devel] Receive hundreds of targeted hits to your website every day from the links in the feeds! Message-ID: <20071016045401.9BB52F2F595478E9@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Google at common-lisp.net Fri Oct 19 01:46:14 2007 From: Google at common-lisp.net (Google at common-lisp.net) Date: 18 Oct 2007 18:46:14 -0700 Subject: [drakma-devel] How would you like an extra $500 - $1000 a week with 15 minutes of your time ? Message-ID: <20071018184613.03B527CE2DC32CA9@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Hit-Booster at common-lisp.net Sat Oct 20 11:44:20 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 20 Oct 2007 04:44:20 -0700 Subject: [drakma-devel] How to get free quality visitors to your website? Message-ID: <20071020044420.F3DBDA6A6CDCDE8D@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From BlogBlaster at common-lisp.net Sun Oct 21 11:05:34 2007 From: BlogBlaster at common-lisp.net (BlogBlaster at common-lisp.net) Date: 21 Oct 2007 04:05:34 -0700 Subject: [drakma-devel] Automatically create thousands of links to your website Message-ID: <20071021040533.C1507224E909EFD2@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Feed at common-lisp.net Mon Oct 22 07:52:45 2007 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 22 Oct 2007 00:52:45 -0700 Subject: [drakma-devel] Receive hundreds of targeted hits to your website every day from the links in the feeds! Message-ID: <20071022005245.D15297196E50C56B@from.header.has.no.domain> An HTML attachment was scrubbed... URL: