From ehuels at gmail.com Fri Apr 6 10:10:58 2007 From: ehuels at gmail.com (Erik Huelsmann) Date: Fri, 6 Apr 2007 12:10:58 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: References: Message-ID: On 3/9/07, Edi Weitz wrote: > On Mon, 5 Mar 2007 08:54:57 +0100, "Erik Huelsmann" wrote: > > > I created a patch (and a full archive) for drakma 0.6.0. I did > > initial testing with usocket 0.3.2 and sbcl on linux 2.6. I'll put > > up a text file at the same location to log the already-tested > > combinations. The archive is at http://hix.nu/drakma/ (which is > > behind my dsl line at 1Mbit). > > > > Version 0.3.2 for usocket is required: I added the > > close-the-stream-means-closing-the-socket API guarantee in that > > version. > > > > Any problems with usocket can be reported directly to me, here (for > > reference for other testers), or at usocket-devel at common-lisp.net. > > > > I'll be testing a number of other combinations too, but I was out of > > time this weekend. > > Did you get any more test results in the meantime? I did. I tested with LispWorks, Allegro 8, cmucl, ecl and clisp on Linux. My clisp was incompatible with cl+ssl, so I'll post more results later. ECL isn't compatible with trivial-gray-streams, it seems. The other 3 worked without problems. Leaves OpenMCL (which I can't test) and LispWorks and Allegro on Windows (which I'll post about later, since I'm in Linux now). All in all, it seems to work just fine. bye, Erik. From ehuels at gmail.com Fri Apr 6 12:43:30 2007 From: ehuels at gmail.com (Erik Huelsmann) Date: Fri, 6 Apr 2007 14:43:30 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: References: Message-ID: On 4/6/07, Erik Huelsmann wrote: > On 3/9/07, Edi Weitz wrote: > > On Mon, 5 Mar 2007 08:54:57 +0100, "Erik Huelsmann" wrote: > > > > > I created a patch (and a full archive) for drakma 0.6.0. I did > > > initial testing with usocket 0.3.2 and sbcl on linux 2.6. I'll put > > > up a text file at the same location to log the already-tested > > > combinations. The archive is at http://hix.nu/drakma/ (which is > > > behind my dsl line at 1Mbit). > > > > > > Version 0.3.2 for usocket is required: I added the > > > close-the-stream-means-closing-the-socket API guarantee in that > > > version. > > > > > > Any problems with usocket can be reported directly to me, here (for > > > reference for other testers), or at usocket-devel at common-lisp.net. > > > > > > I'll be testing a number of other combinations too, but I was out of > > > time this weekend. > > > > Did you get any more test results in the meantime? > > I did. I tested with LispWorks, Allegro 8, cmucl, ecl and clisp on Linux. > > My clisp was incompatible with cl+ssl, so I'll post more results > later. ECL isn't compatible with trivial-gray-streams, it seems. > > The other 3 worked without problems. > > Leaves OpenMCL (which I can't test) and LispWorks and Allegro on > Windows (which I'll post about later, since I'm in Linux now). Ok. I tested on Windows too. I have LispWorks and ACL 6.2 on Windows. The latter doesn't work with start.lisp from STARTER-PACK, so I wasn't really able to tell. LispWorks works beautifully though. That was all the testing I can do. BTW: the CL+SSL problems I experienced were with the newest clisp (2.41), so it looks like Drakma isn't able to run on clisp anymore (?). If there are any more Windows/Linux implementations you want me to test with, just say so! bye, Erik. From edi at agharta.de Fri Apr 6 13:30:36 2007 From: edi at agharta.de (Edi Weitz) Date: Fri, 06 Apr 2007 15:30:36 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: (Erik Huelsmann's message of "Fri, 6 Apr 2007 14:43:30 +0200") References: Message-ID: On Fri, 6 Apr 2007 14:43:30 +0200, "Erik Huelsmann" wrote: > Ok. I tested on Windows too. I have LispWorks and ACL 6.2 on > Windows. The latter doesn't work with start.lisp from STARTER-PACK Sure. STARTER-PACK is only for LispWorks. For AllegroCL, you'd have to figure out a way to locate the ASDF systems. FWIW, the relevant parts of my ~/.clinit.cl on Windows look like this: (in-package :cl-user) (require :asdf) #+:asdf (dolist (dir-candidate (directory "c:/home/lisp/*" :directories-are-files nil)) (when (excl:file-directory-p dir-candidate) (let ((asd-candidate (merge-pathnames "*.asd" dir-candidate))) (when (directory asd-candidate) (push dir-candidate asdf:*central-registry*))))) That should slurp in all "c:/home/lisp/*/*.asd" system definitions. > That was all the testing I can do. BTW: the CL+SSL problems I > experienced were with the newest clisp (2.41), so it looks like > Drakma isn't able to run on clisp anymore (?). Hmm, maybe the CLISP users on this list should try and report to the CL+SSL mailing list if necessary. I personally don't use CLISP. > If there are any more Windows/Linux implementations you want me to > test with, just say so! AllegroCL and LispWorks are important for me. I guess that some people would eventually be interested in SBCL/Win, but I don't know how mature it is. CormanLisp would be nice to have, but I'm not aware that there is currently anyone using Corman with Drakma. They should probably take care of testing themselves. Thanks, Edi. From nowhere.man at levallois.eu.org Fri Apr 6 14:19:26 2007 From: nowhere.man at levallois.eu.org (Pierre THIERRY) Date: Fri, 6 Apr 2007 16:19:26 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: References: Message-ID: <20070406141926.GB1232@bateleur.arcanes.fr.eu.org> Scribit Edi Weitz dies 06/04/2007 hora 15:30: > I guess that some people would eventually be interested in SBCL/Win, > but I don't know how mature it is. Threads are not working yet, so it's not a valid choice for using Hunchentoot, I suppose. It may be possible to test it's compatibility, though. Quickly, Pierre -- nowhere.man at levallois.eu.org OpenPGP 0xD9D50D8A -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From edi at agharta.de Fri Apr 6 14:30:39 2007 From: edi at agharta.de (Edi Weitz) Date: Fri, 06 Apr 2007 16:30:39 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: <20070406141926.GB1232@bateleur.arcanes.fr.eu.org> (Pierre THIERRY's message of "Fri, 6 Apr 2007 16:19:26 +0200") References: <20070406141926.GB1232@bateleur.arcanes.fr.eu.org> Message-ID: On Fri, 6 Apr 2007 16:19:26 +0200, Pierre THIERRY wrote: > Threads are not working yet, so it's not a valid choice for using > Hunchentoot, I suppose. Sure, but this is the Drakma mailing list... :) From ehuels at gmail.com Fri Apr 6 22:13:28 2007 From: ehuels at gmail.com (Erik Huelsmann) Date: Sat, 7 Apr 2007 00:13:28 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: References: Message-ID: On 4/6/07, Edi Weitz wrote: > On Fri, 6 Apr 2007 14:43:30 +0200, "Erik Huelsmann" wrote: > > > Ok. I tested on Windows too. I have LispWorks and ACL 6.2 on > > Windows. The latter doesn't work with start.lisp from STARTER-PACK > > Sure. STARTER-PACK is only for LispWorks. > > For AllegroCL, you'd have to figure out a way to locate the ASDF > systems. FWIW, the relevant parts of my ~/.clinit.cl on Windows look > like this: > > (in-package :cl-user) > > (require :asdf) > > #+:asdf > (dolist (dir-candidate (directory "c:/home/lisp/*" :directories-are-files nil)) > (when (excl:file-directory-p dir-candidate) > (let ((asd-candidate (merge-pathnames "*.asd" dir-candidate))) > (when (directory asd-candidate) > (push dir-candidate asdf:*central-registry*))))) > > That should slurp in all "c:/home/lisp/*/*.asd" system definitions. > > > That was all the testing I can do. BTW: the CL+SSL problems I > > experienced were with the newest clisp (2.41), so it looks like > > Drakma isn't able to run on clisp anymore (?). > > Hmm, maybe the CLISP users on this list should try and report to the > CL+SSL mailing list if necessary. I personally don't use CLISP. > > > If there are any more Windows/Linux implementations you want me to > > test with, just say so! > > AllegroCL and LispWorks are important for me. I guess that some > people would eventually be interested in SBCL/Win, but I don't know > how mature it is. CormanLisp would be nice to have, but I'm not aware > that there is currently anyone using Corman with Drakma. That should be hard: Corman doesn't have octet socket streams, nor does it have trivial-sockets support. I'm working on making Corman support octet/binary sockets, but it has a bit of a weird subtypep implementation (ie non-conforming) which may make it hard to use it with flexi-streams [(progn (deftype 'octet '(unsigned-byte 8)) (subtypep 'octet '(unsigned-byte 8))) -> NIL NIL ] > They should probably take care of testing themselves. Ok. > Thanks, > Edi. I'm not aware of a public Drakma repository. If there isn't, could you tell me whether you applied the patch if/when you do? I can update the Drakma item in the cl-directory then. Thank you too, for all the libraries you provide! bye, Erik. From edi at agharta.de Sat Apr 7 14:39:20 2007 From: edi at agharta.de (Edi Weitz) Date: Sat, 07 Apr 2007 16:39:20 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: (Erik Huelsmann's message of "Sat, 7 Apr 2007 00:13:28 +0200") References: Message-ID: On Sat, 7 Apr 2007 00:13:28 +0200, "Erik Huelsmann" wrote: > I'm not aware of a public Drakma repository. There isn't any. > If there isn't, could you tell me whether you applied the patch > if/when you do? I can update the Drakma item in the cl-directory > then. Sorry for asking dumb questions, but did you send the patch already? When was that? > Thank you too, for all the libraries you provide! You're welcome... :) From ehuels at gmail.com Sat Apr 7 14:52:40 2007 From: ehuels at gmail.com (Erik Huelsmann) Date: Sat, 7 Apr 2007 16:52:40 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: References: Message-ID: On 4/7/07, Edi Weitz wrote: > On Sat, 7 Apr 2007 00:13:28 +0200, "Erik Huelsmann" wrote: > > > I'm not aware of a public Drakma repository. > > There isn't any. > > > If there isn't, could you tell me whether you applied the patch > > if/when you do? I can update the Drakma item in the cl-directory > > then. > > Sorry for asking dumb questions, but did you send the patch already? > When was that? In a message on March 5th, I sent a message which included a reference to a patch located on the net and also an archive based on drakma-0.6.0, with the patch built in. (http://hix.nu/drakma/) For your convenience, I attached the patch to this message too. I see that you have released 0.6.2 now, but the patch still seems to apply just fine. It updates doc/index.html, drakma.asd and request.lisp. bye, Erik. -------------- next part -------------- A non-text attachment was scrubbed... Name: drakma-0.6.0-usocket.patch Type: text/x-diff Size: 2329 bytes Desc: not available URL: From edi at agharta.de Sat Apr 7 18:23:13 2007 From: edi at agharta.de (Edi Weitz) Date: Sat, 07 Apr 2007 20:23:13 +0200 Subject: [drakma-devel] New release 0.7.0 (Was: Portability of Drakma) In-Reply-To: (Erik Huelsmann's message of "Sat, 7 Apr 2007 16:52:40 +0200") References: Message-ID: On Sat, 7 Apr 2007 16:52:40 +0200, "Erik Huelsmann" wrote: > For your convenience, I attached the patch to this message too. OK, thanks, I've now made a new release (0.7.0) based on your patch. Cheers, Edi. From edi at agharta.de Sat Apr 7 18:33:20 2007 From: edi at agharta.de (Edi Weitz) Date: Sat, 07 Apr 2007 20:33:20 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: (Erik Huelsmann's message of "Sat, 7 Apr 2007 16:52:40 +0200") References: Message-ID: On Sat, 7 Apr 2007 16:52:40 +0200, "Erik Huelsmann" wrote: > For your convenience, I attached the patch to this message too. As the docs point to the CLiki page and say 0.3.2 or higher is required, it'd be nice if the CLiki page pointed to something like 0.3.2 (or higher) - also for ASDF-INSTALL. From ehuels at gmail.com Sat Apr 7 19:00:28 2007 From: ehuels at gmail.com (Erik Huelsmann) Date: Sat, 7 Apr 2007 21:00:28 +0200 Subject: [drakma-devel] Re: Portability of Drakma In-Reply-To: References: Message-ID: On 4/7/07, Edi Weitz wrote: > On Sat, 7 Apr 2007 16:52:40 +0200, "Erik Huelsmann" wrote: > > > For your convenience, I attached the patch to this message too. > > As the docs point to the CLiki page and say 0.3.2 or higher is > required, it'd be nice if the CLiki page pointed to something like > 0.3.2 (or higher) - also for ASDF-INSTALL. Ofcourse. I updated it now. Thank you for accepting the patch. Bye, Erik. From nowhere.man at levallois.eu.org Sat Apr 7 22:25:30 2007 From: nowhere.man at levallois.eu.org (Pierre THIERRY) Date: Sun, 8 Apr 2007 00:25:30 +0200 Subject: [drakma-devel] New release 0.7.0 (Was: Portability of Drakma) In-Reply-To: References: Message-ID: <20070407222529.GJ1232@bateleur.arcanes.fr.eu.org> Scribit Edi Weitz dies 07/04/2007 hora 20:23: > OK, thanks, I've now made a new release (0.7.0) based on your patch. BTW, I now also mirror drakma: http://arcanes.fr.eu.org/~pierre/2007/02/weitz/ Recently, Pierre -- nowhere.man at levallois.eu.org OpenPGP 0xD9D50D8A -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From lispercat at gmail.com Tue Apr 10 00:14:01 2007 From: lispercat at gmail.com (Andrei Stebakov) Date: Mon, 9 Apr 2007 20:14:01 -0400 Subject: [drakma-devel] drakma:http-request sometimes returns nil Message-ID: I am using SBCL 1.04. I've just upgraded to latest hunchentoot, drakma etc... It happens when I upload a file using POST request. Most of the times the http-request just works and returns the result which I parse and it's meaningful. Occasionally (1 out of 10 times) the http-request returns nil. To verify it, I tested it not from the web, but from the slime propt. It it took me a while to understand why my web app was misbehaving sometimes. For now I put a workaround like (loop for i from 0 to 5 while (not http-request-result) do (setq http-request-result (drakma:http-request ....)) which works. I'd like to know if it's an expected behavior of the http request or is there something I/we could do to fix it? Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Tue Apr 10 06:13:46 2007 From: edi at agharta.de (Edi Weitz) Date: Tue, 10 Apr 2007 08:13:46 +0200 Subject: [drakma-devel] drakma:http-request sometimes returns nil In-Reply-To: (Andrei Stebakov's message of "Mon, 9 Apr 2007 20:14:01 -0400") References: Message-ID: On Mon, 9 Apr 2007 20:14:01 -0400, "Andrei Stebakov" wrote: > I am using SBCL 1.04. I've just upgraded to latest hunchentoot, > drakma etc... It happens when I upload a file using POST > request. Most of the times the http-request just works and returns > the result which I parse and it's meaningful. Occasionally (1 out of > 10 times) the http-request returns nil. To verify it, I tested it > not from the web, but from the slime propt. It it took me a while to > understand why my web app was misbehaving sometimes. > For now I put a workaround like > (loop for i from 0 to 5 while (not http-request-result) do > (setq http-request-result (drakma:http-request ....)) > which works. > I'd like to know if it's an expected behavior of the http request Of course not. > or is there something I/we could do to fix it? I'd need a reproducible test case to say more about it. From lispercat at gmail.com Tue Apr 10 14:00:43 2007 From: lispercat at gmail.com (Andrei Stebakov) Date: Tue, 10 Apr 2007 10:00:43 -0400 Subject: [drakma-devel] drakma:http-request sometimes returns nil In-Reply-To: References: Message-ID: I wish I could provide the test case but in this case I log on to the server, it gives the the secure token which I use later to do the file upload. I call the http-request with :method :post, :form-data t, :content-length t. The rest are parameters to the POST. Anyway, I'll keep an eye on it and when I can I'll provide the test case. Andrew On 4/10/07, Edi Weitz wrote: > > On Mon, 9 Apr 2007 20:14:01 -0400, "Andrei Stebakov" > wrote: > > > I am using SBCL 1.04. I've just upgraded to latest hunchentoot, > > drakma etc... It happens when I upload a file using POST > > request. Most of the times the http-request just works and returns > > the result which I parse and it's meaningful. Occasionally (1 out of > > 10 times) the http-request returns nil. To verify it, I tested it > > not from the web, but from the slime propt. It it took me a while to > > understand why my web app was misbehaving sometimes. > > For now I put a workaround like > > (loop for i from 0 to 5 while (not http-request-result) do > > (setq http-request-result (drakma:http-request ....)) > > which works. > > I'd like to know if it's an expected behavior of the http request > > Of course not. > > > or is there something I/we could do to fix it? > > I'd need a reproducible test case to say more about it. > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Tue Apr 10 14:04:34 2007 From: edi at agharta.de (Edi Weitz) Date: Tue, 10 Apr 2007 16:04:34 +0200 Subject: [drakma-devel] drakma:http-request sometimes returns nil In-Reply-To: (Andrei Stebakov's message of "Tue, 10 Apr 2007 10:00:43 -0400") References: Message-ID: On Tue, 10 Apr 2007 10:00:43 -0400, "Andrei Stebakov" wrote: > I wish I could provide the test case but in this case I log on to > the server, it gives the the secure token which I use later to do > the file upload. Maybe the secure token only has a limited TTL? But, still, Drakma shouldn't simply return NIL. > I call the http-request with :method :post, :form-data t, > :content-length t. The rest are parameters to the POST. Anyway, > I'll keep an eye on it and when I can I'll provide the test case. You could use *HEADER-STREAM* to see what's happening. Or, even better, you could use WireShark to log the whole HTTP traffic. If the problem resurfaces, you'll just have to extract the relevant part. From rosssd at gmail.com Thu Apr 26 14:16:18 2007 From: rosssd at gmail.com (Sean) Date: Thu, 26 Apr 2007 15:16:18 +0100 Subject: [drakma-devel] Lenient read-line* Message-ID: <1177596978.26324.24.camel@deepthought> I've attached a small patch which makes chunga:read-line* a little more lenient with regards to line endings. Currently (drakma:http-request "http://news.ycombinator.com") fails with an EOF since the arc server doesn't respond with CRLF but only uses plain LF. The attached patch works around this by assuming that when a LineFeed is encountered it also designates the end of a line, although it is quite possibly the wrong thing. Cheers, Sean. -- ...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. -------------- next part -------------- A non-text attachment was scrubbed... Name: read-star.patch Type: text/x-patch Size: 1344 bytes Desc: not available URL: From edi at agharta.de Thu Apr 26 14:24:14 2007 From: edi at agharta.de (Edi Weitz) Date: Thu, 26 Apr 2007 16:24:14 +0200 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <1177596978.26324.24.camel@deepthought> (Sean's message of "Thu, 26 Apr 2007 15:16:18 +0100") References: <1177596978.26324.24.camel@deepthought> Message-ID: On Thu, 26 Apr 2007 15:16:18 +0100, Sean wrote: > I've attached a small patch which makes chunga:read-line* a little > more lenient with regards to line endings. > > Currently (drakma:http-request "http://news.ycombinator.com") fails > with an EOF since the arc server doesn't respond with CRLF but only > uses plain LF. So much for Arc... > The attached patch works around this by assuming that when a > LineFeed is encountered it also designates the end of a line, > although it is quite possibly the wrong thing. Thanks, but I wouldn't want to accept that in this form. I think this liberal behaviour should be controlled by a user-visible variable and the default should be to stick to the RFC. Also, when sending patches, please adhere to the coding style of the rest of the code: http://weitz.de/patches.html Thanks, Edi. From rm at seid-online.de Thu Apr 26 14:44:20 2007 From: rm at seid-online.de (Ralf Mattes) Date: Thu, 26 Apr 2007 16:44:20 +0200 Subject: [drakma-devel] Lenient read-line* In-Reply-To: References: <1177596978.26324.24.camel@deepthought> Message-ID: <1177598660.11386.26.camel@localhost.localdomain> On Thu, 2007-04-26 at 16:24 +0200, Edi Weitz wrote: > On Thu, 26 Apr 2007 15:16:18 +0100, Sean wrote: > > > I've attached a small patch which makes chunga:read-line* a little > > more lenient with regards to line endings. > > > > Currently (drakma:http-request "http://news.ycombinator.com") fails > > with an EOF since the arc server doesn't respond with CRLF but only > > uses plain LF. > > So much for Arc... Sean, i hope you filed a bug against arc - this isn't valid HTTP any more. > > The attached patch works around this by assuming that when a > > LineFeed is encountered it also designates the end of a line, > > although it is quite possibly the wrong thing. > > Thanks, but I wouldn't want to accept that in this form. I think this > liberal behaviour should be controlled by a user-visible variable and > the default should be to stick to the RFC. Yes, please. I'd like to know when i get invalid responses. And once you start accepting stray LF you might want to accept stray CR as well - the road to insanity ;-) I vaguely recall sever performance problems in the early days of Java exactly _because_ their network stack tried some clever heuristics to catch these kinds of errors. Cheers Ralf Mattes P.S: Once again, thank you so much Edi. I'm just testing some custom Apache modules with Drakma. It's such a pleasure to be able to create requests from the repl. > Also, when sending patches, please adhere to the coding style of the > rest of the code: > > http://weitz.de/patches.html > > Thanks, > Edi. > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel From rosssd at gmail.com Thu Apr 26 15:07:50 2007 From: rosssd at gmail.com (Sean) Date: Thu, 26 Apr 2007 16:07:50 +0100 Subject: [drakma-devel] Lenient read-line* In-Reply-To: References: <1177596978.26324.24.camel@deepthought> Message-ID: <1177600070.26324.39.camel@deepthought> On Thu, 2007-04-26 at 16:24 +0200, Edi Weitz wrote: > So much for Arc... and hopes where so high.... > Thanks, but I wouldn't want to accept that in this form. I think this > liberal behaviour should be controlled by a user-visible variable and > the default should be to stick to the RFC. Sounds good, if you are happy with an exported variable named *linefeed-is-crlf* I'll put together a patch which conditionally enables the aforementioned behaviour (and updated documentation). Cheers, Sean. -- ...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 Apr 26 15:22:22 2007 From: edi at agharta.de (Edi Weitz) Date: Thu, 26 Apr 2007 17:22:22 +0200 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <1177600070.26324.39.camel@deepthought> (Sean's message of "Thu, 26 Apr 2007 16:07:50 +0100") References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> Message-ID: On Thu, 26 Apr 2007 16:07:50 +0100, Sean wrote: > Sounds good, if you are happy with an exported variable named > *linefeed-is-crlf* I'll put together a patch which conditionally > enables the aforementioned behaviour (and updated documentation). Yes, that's fine. But maybe we should pick up Ralf's suggestion (hehe... :) to also accept stray CRs while we're at it. Then the name should probably be something like *ACCEPT-WRONG-LINE-ENDINGS-P*. Feel free to pick a better name, you're the native speaker... :) From jeffrey at cunningham.net Fri Apr 27 00:42:45 2007 From: jeffrey at cunningham.net (Jeff Cunningham) Date: Thu, 26 Apr 2007 17:42:45 -0700 Subject: [drakma-devel] Lenient read-line* In-Reply-To: References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> Message-ID: <46314705.1040307@cunningham.net> Edi Weitz wrote: > On Thu, 26 Apr 2007 16:07:50 +0100, Sean wrote: > > >> Sounds good, if you are happy with an exported variable named >> *linefeed-is-crlf* I'll put together a patch which conditionally >> enables the aforementioned behaviour (and updated documentation). >> > > Yes, that's fine. > > But maybe we should pick up Ralf's suggestion (hehe... :) to also > accept stray CRs while we're at it. Then the name should probably be > something like *ACCEPT-WRONG-LINE-ENDINGS-P*. Feel free to pick a > better name, you're the native speaker... :) > Might I suggest *ACCEPT-BOGUS-EOLS* ? --Jeff From edi at agharta.de Fri Apr 27 06:16:32 2007 From: edi at agharta.de (Edi Weitz) Date: Fri, 27 Apr 2007 08:16:32 +0200 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <46314705.1040307@cunningham.net> (Jeff Cunningham's message of "Thu, 26 Apr 2007 17:42:45 -0700") References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> Message-ID: On Thu, 26 Apr 2007 17:42:45 -0700, Jeff Cunningham wrote: > Might I suggest *ACCEPT-BOGUS-EOLS* ? Yes, I like that. From rosssd at gmail.com Fri Apr 27 12:24:23 2007 From: rosssd at gmail.com (Sean) Date: Fri, 27 Apr 2007 13:24:23 +0100 Subject: [drakma-devel] Lenient read-line* In-Reply-To: References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> Message-ID: <1177676663.9218.5.camel@deepthought> Sorry for the delay. I've attached a patch which implements *accept-bogus-eols* for read-line* along with updated docs. When bound to a non-nil value then a lone CR or LF will be accepted as EOL. Cheers, Sean. -- ...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. -------------- next part -------------- A non-text attachment was scrubbed... Name: accept-bogus-eol.patch Type: text/x-patch Size: 4908 bytes Desc: not available URL: From rm at seid-online.de Fri Apr 27 17:50:22 2007 From: rm at seid-online.de (Ralf Mattes) Date: Fri, 27 Apr 2007 19:50:22 +0200 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <1177676663.9218.5.camel@deepthought> References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> <1177676663.9218.5.camel@deepthought> Message-ID: <1177696222.12204.4.camel@localhost.localdomain> On Fri, 2007-04-27 at 13:24 +0100, Sean wrote: > Sorry for the delay. > > I've attached a patch which implements *accept-bogus-eols* for > read-line* along with updated docs. > When bound to a non-nil value then a lone CR or LF will be accepted > as EOL. > Ok, since even Edi took my remark (partly) serious I'll bite: Could you please define "lone" in this context? Cheers, RalfD > Cheers, > Sean. > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel From rosssd at gmail.com Mon Apr 30 11:08:41 2007 From: rosssd at gmail.com (Sean) Date: Mon, 30 Apr 2007 12:08:41 +0100 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <1177696222.12204.4.camel@localhost.localdomain> References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> <1177676663.9218.5.camel@deepthought> <1177696222.12204.4.camel@localhost.localdomain> Message-ID: <1177931321.15759.1.camel@deepthought> On Fri, 2007-04-27 at 19:50 +0200, Ralf Mattes wrote: > On Fri, 2007-04-27 at 13:24 +0100, Sean wrote: > Ok, since even Edi took my remark (partly) serious I'll bite: > > Could you please define "lone" in this context? OK, A single LF, or a single CR (which may or may not be followed by a LF), will constitute an EOL. Cheers, Sean (who is finally back in front of a PC). -- ...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 nowhere.man at levallois.eu.org Mon Apr 30 11:35:32 2007 From: nowhere.man at levallois.eu.org (Pierre THIERRY) Date: Mon, 30 Apr 2007 13:35:32 +0200 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <1177931321.15759.1.camel@deepthought> References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> <1177676663.9218.5.camel@deepthought> <1177696222.12204.4.camel@localhost.localdomain> <1177931321.15759.1.camel@deepthought> Message-ID: <20070430113532.GG16339@bateleur.arcanes.fr.eu.org> Scribit Sean dies 30/04/2007 hora 12:08: > A single LF, or a single CR (which may or may not be followed by a > LF), will constitute an EOL. How should a sequence of CRs and LFs be interpreted? Should "" be three or two EOL? Curiously, Pierre -- nowhere.man at levallois.eu.org OpenPGP 0xD9D50D8A -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From rosssd at gmail.com Mon Apr 30 12:01:39 2007 From: rosssd at gmail.com (Sean) Date: Mon, 30 Apr 2007 13:01:39 +0100 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <20070430113532.GG16339@bateleur.arcanes.fr.eu.org> References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> <1177676663.9218.5.camel@deepthought> <1177696222.12204.4.camel@localhost.localdomain> <1177931321.15759.1.camel@deepthought> <20070430113532.GG16339@bateleur.arcanes.fr.eu.org> Message-ID: <1177934499.16041.8.camel@deepthought> On Mon, 2007-04-30 at 13:35 +0200, Pierre THIERRY wrote: > Scribit Sean dies 30/04/2007 hora 12:08: > > A single LF, or a single CR (which may or may not be followed by a > > LF), will constitute an EOL. > > How should a sequence of CRs and LFs be interpreted? > > Should "" be three or two EOL? This would be 2, A CRLF and a LF. Sean. -- ...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 nowhere.man at levallois.eu.org Mon Apr 30 12:08:35 2007 From: nowhere.man at levallois.eu.org (Pierre THIERRY) Date: Mon, 30 Apr 2007 14:08:35 +0200 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <1177934499.16041.8.camel@deepthought> References: <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> <1177676663.9218.5.camel@deepthought> <1177696222.12204.4.camel@localhost.localdomain> <1177931321.15759.1.camel@deepthought> <20070430113532.GG16339@bateleur.arcanes.fr.eu.org> <1177934499.16041.8.camel@deepthought> Message-ID: <20070430120835.GH16339@bateleur.arcanes.fr.eu.org> Scribit Sean dies 30/04/2007 hora 13:01: > > Should "" be three or two EOL? > This would be 2, A CRLF and a LF. So a CR is an EOL if not followed by a LF, a LF is an EOL if not following a CR, a CR or LF are an EOL in all other cases and a CRLF is an EOL. Is that right? Curiously, Pierre -- nowhere.man at levallois.eu.org OpenPGP 0xD9D50D8A -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From rosssd at gmail.com Mon Apr 30 12:39:10 2007 From: rosssd at gmail.com (Sean) Date: Mon, 30 Apr 2007 13:39:10 +0100 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <20070430120835.GH16339@bateleur.arcanes.fr.eu.org> References: <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> <1177676663.9218.5.camel@deepthought> <1177696222.12204.4.camel@localhost.localdomain> <1177931321.15759.1.camel@deepthought> <20070430113532.GG16339@bateleur.arcanes.fr.eu.org> <1177934499.16041.8.camel@deepthought> <20070430120835.GH16339@bateleur.arcanes.fr.eu.org> Message-ID: <1177936750.16041.40.camel@deepthought> On Mon, 2007-04-30 at 14:08 +0200, Pierre THIERRY wrote: > Scribit Sean dies 30/04/2007 hora 13:01: > > > Should "" be three or two EOL? > > This would be 2, A CRLF and a LF. > > So a CR is an EOL if not followed by a LF, a LF is an EOL if not > following a CR, a CR or LF are an EOL in all other cases and a CRLF is > an EOL. Is that right? Yes :) Amused, Sean. -- ...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 rosssd at gmail.com Mon Apr 30 12:47:07 2007 From: rosssd at gmail.com (Sean) Date: Mon, 30 Apr 2007 13:47:07 +0100 Subject: [drakma-devel] Lenient read-line* In-Reply-To: <20070430114143.GB25235@seid-online.de> References: <1177596978.26324.24.camel@deepthought> <1177600070.26324.39.camel@deepthought> <46314705.1040307@cunningham.net> <1177676663.9218.5.camel@deepthought> <1177696222.12204.4.camel@localhost.localdomain> <1177931321.15759.1.camel@deepthought> <20070430114143.GB25235@seid-online.de> Message-ID: <1177937227.16041.50.camel@deepthought> On Mon, 2007-04-30 at 11:41 +0000, rm at tuxteam.de wrote: > Hmm - IIRC that was causing the problems in Java way back ... imagine > the sequence "blah blah" (some network delay "blub more bah". > And then there is "" (which i've seen at least once!). Is > this one or two or even three newlines. Iff your answer is > 1 than you > might start reading header lines as content .... It would be 2 here, and would quite possibly leave headers unconsumed, which is in error. The current behaviour is definitely preferred for this case (signalling an error) but my feeling is that this behaviour, while quite acceptable in this example, is not the best for all cases (news.ycombinator.com for example). In the same vein the approach I've suggested is definitely not the best for all cases, merely a method to workaround servers that do not honour RFC 2616[1]. Cheers, Sean. [1] Granted this is done by ascribing semantics to single CR's and LF's in an essentially ad hoc manner. -- ...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 hom.sepanta at gmail.com Mon Apr 30 22:57:12 2007 From: hom.sepanta at gmail.com (Mostafa Razavi) Date: Tue, 01 May 2007 02:27:12 +0330 Subject: [drakma-devel] drakma causes lisp connection close unexpectedly Message-ID: <46367448.1050505@gmail.com> I'm starting to use Drakma in a program of mine, and it seems to work fine for me except in one strange case. I was trying to retrieve a page, with (drakma:http-request "http://cesa.iust.ac.ir/"), that I got "Lisp connection closed unexpectedly: exited abnormally with code 256". I set *header-stream* to see what's happening. This is the result: GET / HTTP/1.1 Host: cesa.iust.ac.ir User-Agent: Drakma/0.7.0 (SBCL 1.0.3; Linux; 2.6.20-15-generic; http://weitz.de/drakma/) Accept: */* Connection: close HTTP/1.1 302 Found Connection: close Date: Mon, 30 Apr 2007 22:52:19 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Location: /Default.aspx?AspxAutoDetectCookieSupport=1 Set-Cookie: AspxAutoDetectCookieSupport=1; path=/ Cache-Control: private Content-Type: text/html GET /Default.aspx?AspxAutoDetectCookieSupport=1 HTTP/1.1 Host: cesa.iust.ac.ir User-Agent: Drakma/0.7.0 (SBCL 1.0.3; Linux; 2.6.20-15-generic; http://weitz.de/drakma/) Accept: */* Connection: close HTTP/1.1 302 Found Connection: close Date: Mon, 30 Apr 2007 22:52:28 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Location: /(X(1)S(rmofw345wvkjbzjz54jnyu45))/Default.aspx?AspxAutoDetectCookieSupport=1 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 194 GET /(X(1)S(rmofw345wvkjbzjz54jnyu45))/Default.aspx?AspxAutoDetectCookieSupport=1 HTTP/1.1 Host: cesa.iust.ac.ir User-Agent: Drakma/0.7.0 (SBCL 1.0.3; Linux; 2.6.20-15-generic; http://weitz.de/drakma/) Accept: */* Connection: close HTTP/1.1 200 OK Connection: close Date: Mon, 30 Apr 2007 22:52:34 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 72459 Other web pages I have tested work fine, but this is the one page I'm going to work with. Any ideas? Thanks. Homayoon, (new-comer) From ctdean at sokitomi.com Mon Apr 30 23:17:20 2007 From: ctdean at sokitomi.com (Chris Dean) Date: Mon, 30 Apr 2007 16:17:20 -0700 Subject: [drakma-devel] drakma causes lisp connection close unexpectedly In-Reply-To: <46367448.1050505@gmail.com> (Mostafa Razavi's message of "Tue, 01 May 2007 02:27:12 +0330") References: <46367448.1050505@gmail.com> Message-ID: Mostafa Razavi writes: > I'm starting to use Drakma in a program of mine, and it seems to work > fine for me except in one strange case. I was trying to retrieve a > page, with (drakma:http-request "http://cesa.iust.ac.ir/"), that I got > "Lisp connection closed unexpectedly: exited abnormally with code > 256". That call works for me on LispWorks. However, I've had issues with printing debugging output in my environment. I use SLIME and LispWorks and I can get into situations where I print characters to the repl/interaction buffer and that kills my LispWorks image. So, can we have a little more detail? How are you running sbcl? Is it inside SLIME? Are you trying to print some of the data out to your screen? If so, can you try (length (drakma:http-request "http://cesa.iust.ac.ir/")) and see if that works? For me on LispWorks I get: (length (drakma:http-request "http://cesa.iust.ac.ir/")) => 71253 When I print out the data, I get utf-8 data in a language I can't read (perhaps Farsi, but I really have no idea!). Cheers, Chris Dean From edi at agharta.de Mon Apr 30 23:31:58 2007 From: edi at agharta.de (Edi Weitz) Date: Tue, 01 May 2007 01:31:58 +0200 Subject: [drakma-devel] drakma causes lisp connection close unexpectedly In-Reply-To: <46367448.1050505@gmail.com> (Mostafa Razavi's message of "Tue, 01 May 2007 02:27:12 +0330") References: <46367448.1050505@gmail.com> Message-ID: On Tue, 01 May 2007 02:27:12 +0330, Mostafa Razavi wrote: > I'm starting to use Drakma in a program of mine, and it seems to > work fine for me except in one strange case. I was trying to > retrieve a page, with (drakma:http-request > "http://cesa.iust.ac.ir/"), that I got "Lisp connection closed > unexpectedly: exited abnormally with code 256". As Chris already said, this looks very much like a SLIME issue. Actually, I'd be willing to bet that it is one... :) Works fine for me with LispWorks on Windows, but the page contains a lot characters I don't know - maybe Arabic. HTH, Edi.