From lispercat at gmail.com Fri Feb 6 18:15:51 2009 From: lispercat at gmail.com (Andrei Stebakov) Date: Fri, 6 Feb 2009 13:15:51 -0500 Subject: [drakma-devel] http-request fails because of puri... Message-ID: Hi I have a link like "http://www.test.com/aaa.aspx?par1=http://www.test2.com/bbb.aspx?par2=http://www.test3.com" (I changed names but the structure is the same) For me it's a completely legit request as those nested requests create the right cookie environment for the subsequent calls. If I paste it in a browser, it'll give me the right page with the right cookies set. When I use (http-request link) with the link puri complains: Parse error:URI "http://www.test.com/aaa.aspx?par1=http://www.test2.com/bbb.aspx?par2=http://www.test3.com" contains illegal character #\? at position 63. [Condition of type PURI:URI-PARSE-ERROR] I can repro this error with: (puri:parse-uri "http://www.test.com/aaa.aspx?par1=http://www.test2.com/bbb.aspx?par2=http://www.test3.com") Apparently puri doesn't like the "?" in the parameter section of the first request (before par2). Does it make the whole request invalid? How can I get around this issue? Thank you, Andrei From edi at agharta.de Sat Feb 7 19:24:03 2009 From: edi at agharta.de (Edi Weitz) Date: Sat, 7 Feb 2009 20:24:03 +0100 Subject: [drakma-devel] http-request fails because of puri... In-Reply-To: References: Message-ID: On Fri, Feb 6, 2009 at 7:15 PM, Andrei Stebakov wrote: > I have a link like > "http://www.test.com/aaa.aspx?par1=http://www.test2.com/bbb.aspx?par2=http://www.test3.com" > (I changed names but the structure is the same) > For me it's a completely legit request as those nested requests create > the right cookie environment for the subsequent calls. > If I paste it in a browser, it'll give me the right page with the > right cookies set. > When I use (http-request link) with the link > puri complains: > Parse error:URI > "http://www.test.com/aaa.aspx?par1=http://www.test2.com/bbb.aspx?par2=http://www.test3.com" > contains illegal character #\? at position 63. > [Condition of type PURI:URI-PARSE-ERROR] > > I can repro this error with: > (puri:parse-uri > "http://www.test.com/aaa.aspx?par1=http://www.test2.com/bbb.aspx?par2=http://www.test3.com") > > Apparently puri doesn't like the "?" in the parameter section of the > first request (before par2). Does it make the whole request invalid? > How can I get around this issue? This is really just a Puri question and not a Drakma question, but here goes: You should be able to get around the issue by properly escaping the question mark (or better the whole parameter). There are numerous Lisp functions called URL-ESCAPE or similar flying around. The URL is accepted by browsers because they try to err on the liberal side as far as human input is concerned. I think a library like Puri should not follow their example and it's behaviour seems correct to me. HTH, Edi. From edi at agharta.de Thu Feb 19 01:58:21 2009 From: edi at agharta.de (Edi Weitz) Date: Thu, 19 Feb 2009 02:58:21 +0100 Subject: [drakma-devel] New releases of Hunchentoot, Drakma, and Chunga Message-ID: Hi, I've just released new versions (all called 1.0.0) of Hunchentoot, Drakma, and Chunga. Note that none of these is compatible with earlier versions, so if you upgrade, you'll need to upgrade all of them. If you're using Hunchentoot or Drakma in a production environment and if it works well for you, you probably shouldn't switch. These are releases with a lot of changes and it is pretty likely that they contain bugs. If you're tracking the development, it'd be nice if you could download the new versions and provide feedback, though. The good news: * Hunchentoot has a new architecture that should hopefully make it much easier to extend or to customize it. * Both Huchentoot and Drakma should be faster now. * Now that we finally have release versions again, there are more things to come. Expect 1.0.1, 1.0.2, etc. releases in the next weeks. The bad news: * The Hunchentoot API has changed considerably and you'll have to read the documentation to see how it works now. Of course, we didn't do that to annoy you - we have to change our own web apps as well. We think that the new API is better, though, and that the change was worth it. * Some stuff has been removed, either because it seemed that nobody used it or because we thought it didn't really belong into a web server. Have fun, Edi. From mail at chaitanyagupta.com Thu Feb 19 07:36:58 2009 From: mail at chaitanyagupta.com (Chaitanya Gupta) Date: Thu, 19 Feb 2009 13:06:58 +0530 Subject: [drakma-devel] [hunchentoot-devel] New releases of Hunchentoot, Drakma, and Chunga In-Reply-To: References: Message-ID: <499D0C1A.9050201@chaitanyagupta.com> Edi Weitz wrote: > Hi, > > I've just released new versions (all called 1.0.0) of Hunchentoot, > Drakma, and Chunga. That is cool. Also, will the "bleeding-edge" development still happen in the bknr-svn repository? Chaitanya > Note that none of these is compatible with > earlier versions, so if you upgrade, you'll need to upgrade all of > them. > > If you're using Hunchentoot or Drakma in a production environment and > if it works well for you, you probably shouldn't switch. These are > releases with a lot of changes and it is pretty likely that they > contain bugs. If you're tracking the development, it'd be nice if you > could download the new versions and provide feedback, though. > > The good news: > > * Hunchentoot has a new architecture that should hopefully make it > much easier to extend or to customize it. > > * Both Huchentoot and Drakma should be faster now. > > * Now that we finally have release versions again, there are more > things to come. Expect 1.0.1, 1.0.2, etc. releases in the next > weeks. > > The bad news: > > * The Hunchentoot API has changed considerably and you'll have to read > the documentation to see how it works now. Of course, we didn't do > that to annoy you - we have to change our own web apps as well. We > think that the new API is better, though, and that the change was > worth it. > > * Some stuff has been removed, either because it seemed that nobody > used it or because we thought it didn't really belong into a web > server. > > Have fun, > Edi. > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > > From edi at agharta.de Thu Feb 19 10:52:24 2009 From: edi at agharta.de (Edi Weitz) Date: Thu, 19 Feb 2009 11:52:24 +0100 Subject: [drakma-devel] [hunchentoot-devel] New releases of Hunchentoot, Drakma, and Chunga In-Reply-To: <499D0C1A.9050201@chaitanyagupta.com> References: <499D0C1A.9050201@chaitanyagupta.com> Message-ID: On Thu, Feb 19, 2009 at 8:36 AM, Chaitanya Gupta wrote: > That is cool. Also, will the "bleeding-edge" development still happen in the > bknr-svn repository? Yes, I think for now we will continue to use Hans' repository. Edi. From ctdean at sokitomi.com Thu Feb 19 18:02:07 2009 From: ctdean at sokitomi.com (Chris Dean) Date: Thu, 19 Feb 2009 10:02:07 -0800 Subject: [drakma-devel] New releases of Hunchentoot, Drakma, and Chunga In-Reply-To: (Edi Weitz's message of "Thu, 19 Feb 2009 02:58:21 +0100") References: Message-ID: > I've just released new versions (all called 1.0.0) of Hunchentoot, > Drakma, and Chunga. Great news! Thanks for all your work. Cheers, Chris Dean From tomoyuki28jp at gmail.com Wed Feb 25 03:57:34 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Wed, 25 Feb 2009 12:57:34 +0900 Subject: [drakma-devel] a bug in send-cookie-p function Message-ID: <780e7d140902241957n7e45d61dy6a7339387609a684@mail.gmail.com> Hello guys, This is my first post here. I think I found a bug in drakma. When I send an http request to the root directory with cookie path set to "/", drakma::send-cookie-p function returns nil. Therefore, drakma don't send any cookie. ex) request-uri: "http://localhost/" or "http://localhost/?key=value" cookie: # That is because the way of using puri's uri functions is wrong. I think Edi expects following code returns "/", but it returns nil. That's why drakma::send-cookie-p function returns nil. (let* ((uri "http://localhost/") (uri (cond ((puri:uri-p uri) (puri:copy-uri uri)) (t (puri:parse-uri uri))))) (puri:uri-path uri)) Do you think it's a bug in drakma? Or has it been already fixed? The versions of related packages. SBCL 1.0.18.debian drakma-0.11.5 puri-1.5.1 I am looking forward to hearing from you. Thanks, Tomo From edi at agharta.de Wed Feb 25 07:48:01 2009 From: edi at agharta.de (Edi Weitz) Date: Wed, 25 Feb 2009 08:48:01 +0100 Subject: [drakma-devel] a bug in send-cookie-p function In-Reply-To: <780e7d140902241957n7e45d61dy6a7339387609a684@mail.gmail.com> References: <780e7d140902241957n7e45d61dy6a7339387609a684@mail.gmail.com> Message-ID: On Wed, Feb 25, 2009 at 4:57 AM, Tomo Matsumoto wrote: > When I send an http request to the root directory with cookie path set > to "/", drakma::send-cookie-p function returns nil. Therefore, drakma > don't send any cookie. > ex) > request-uri: "http://localhost/" or "http://localhost/?key=value" > cookie: # domain=localhost> > > That is because the way of using puri's uri functions is wrong. > I think Edi expects following code returns "/", but it returns nil. > That's why drakma::send-cookie-p function returns nil. > (let* ((uri "http://localhost/") > ? ? ? (uri (cond ((puri:uri-p uri) (puri:copy-uri uri)) > ? ? ? ? ? ? ?(t (puri:parse-uri uri))))) > ?(puri:uri-path uri)) > > Do you think it's a bug in drakma? > Or has it been already fixed? Thanks for the report. I fixed it in the dev version: http://bknr.net/trac/changeset/4322 > The versions of related packages. > SBCL 1.0.18.debian > drakma-0.11.5 > puri-1.5.1 You're not using the latest version of Drakma (but it had the same problem). Cheers, Edi.