From ndj at hivsa.com Wed Jan 9 12:57:37 2008 From: ndj at hivsa.com (Nico de Jager) Date: Wed, 09 Jan 2008 14:57:37 +0200 Subject: [drakma-devel] CHUNGA:INPUT-CHUNKING-UNEXPECTED-END-OF-FILE In-Reply-To: (Edi Weitz's message of "Thu, 13 Dec 2007 21:36:22 +0100") References: <87ir346tah.fsf@davinci.hivsa.com> Message-ID: <87ve63jgvy.fsf@davinci.hivsa.com> Edi Weitz writes: > On Wed, 12 Dec 2007 13:34:14 +0200, Nico de Jager wrote: > >> I have a fingerprint scanning application, that uploads fingerprint >> images using Drakma to a Hunchentoot server. Everything works great >> as long as I don't use a secure connection. With https, I get a >> CHUNGA:INPUT-CHUNKING-UNEXPECTED-END-OF-FILE condition on the >> server, and "Timeout while writing 8192 bytes to >> #" on the client. Sometimes the uploads are >> successful with https, though. Sorry for only replying now, I was away. Let me know if need to repost my original message. > It's hard to say something about this from here. Are you able to > generate a small, self-contained example that exposes the problem? Yes, see the attached program. I also included a couple of images that fails _most_ of the time. > What did you do to isolate the error? Uhm, the attached example simply tries to upload a few image files (evaluate the function test-upload). *Important*: From Linux to XP/Linux all uploads work for both secure and non-secure attempts. From XP only non-secure uploads work. Secure uploads from XP will work about 5% of the time. I even tried it on different machines. > Does it work without the trivial-ldap module being loaded? No, I removed trivial-ldap completely in the example. > Does it work with another Lisp > implementation on the client or on the server side? Uploads from LispWorks (Win32) to LispWorks or SBCL on Linux fails. LispWorks (Win32) to LispWorks on Win32 fails. SBCL (Linux) to Win32 LispWorks works. SBCL (Linux) to LispWorks and SBCL on Linux works. LispWorks (Linux) to LispWorks and SBCL on Linux works. I don't have another CL for Win32. LispWorks 5.0.2 was used in all instances. > Does it work if you use :CONTENT-LENGTH T in your Drakma request? No, it does not seem to make a difference. Thanks in advance. Nico -------------- next part -------------- A non-text attachment was scrubbed... Name: test-upload.tar.bz2 Type: application/octet-stream Size: 265082 bytes Desc: example URL: From jcm at sdf.lonestar.org Fri Jan 11 19:38:56 2008 From: jcm at sdf.lonestar.org (Jonathon McKitrick) Date: Fri, 11 Jan 2008 19:38:56 +0000 Subject: [drakma-devel] Odd LW error not in SBCL Message-ID: <20080111193856.GB11819@SDF.LONESTAR.ORG> I'm running a drakma-based app that gives an error on LispWorks, but not on SBCL. Error: End of file while reading stream #. This is after a POST request, and the same error never occurs with SBCL. Is there something else I should be setting when calling http-request in LW versus SBCL? Jonathon McKitrick -- 'Java is a fine language, for low values of fine.' From edi at agharta.de Fri Jan 11 22:48:10 2008 From: edi at agharta.de (Edi Weitz) Date: Fri, 11 Jan 2008 23:48:10 +0100 Subject: [drakma-devel] Odd LW error not in SBCL In-Reply-To: <20080111193856.GB11819@SDF.LONESTAR.ORG> (Jonathon McKitrick's message of "Fri, 11 Jan 2008 19:38:56 +0000") References: <20080111193856.GB11819@SDF.LONESTAR.ORG> Message-ID: On Fri, 11 Jan 2008 19:38:56 +0000, Jonathon McKitrick wrote: > I'm running a drakma-based app that gives an error on LispWorks, but > not on SBCL. > > Error: End of file while reading stream #. > > This is after a POST request, and the same error never occurs with > SBCL. Is there something else I should be setting when calling > http-request in LW versus SBCL? No, not really. If SBCL and LispWorks don't behave the same, then I'd say it's a bug. Do you have a URL and a way to reproduce this? From victor.kryukov at gmail.com Mon Jan 14 01:33:52 2008 From: victor.kryukov at gmail.com (Victor Kryukov) Date: Sun, 13 Jan 2008 19:33:52 -0600 Subject: [drakma-devel] END-OF-FILE Message-ID: Hello list, I've the following condition end of file on # [Condition of type END-OF-FILE] while trying to do (drakma:http-request "http://www.bluishcoder.co.nz/atom.xml") Below is the relevant backtrace part: 0: (READ-CHAR # T NIL #) 1: (CHUNGA:READ-LINE* # NIL) 2: (DRAKMA::READ-STATUS-LINE # NIL) 3: ((LABELS DRAKMA::FINISH-REQUEST) NIL NIL) 4: (DRAKMA:HTTP-REQUEST "http://www.bluishcoder.co.nz/atom.xml") I can access that URI without any problems using my browser. I'm slightly confused what's going on - could somebody please provide any comments? I'm using DRAKMA v. 0.11.1 and SBCL 1.0.13 on x86-64 linux (Ubuntu 7.10). Best Regards, Victor. From edi at agharta.de Mon Jan 14 02:02:16 2008 From: edi at agharta.de (Edi Weitz) Date: Mon, 14 Jan 2008 03:02:16 +0100 Subject: [drakma-devel] New release 0.11.2 (Was: CHUNGA:INPUT-CHUNKING-UNEXPECTED-END-OF-FILE) In-Reply-To: <87ve63jgvy.fsf@davinci.hivsa.com> (Nico de Jager's message of "Wed, 09 Jan 2008 14:57:37 +0200") References: <87ir346tah.fsf@davinci.hivsa.com> <87ve63jgvy.fsf@davinci.hivsa.com> Message-ID: On Wed, 09 Jan 2008 14:57:37 +0200, Nico de Jager wrote: > Uhm, the attached example simply tries to upload a few image files I could reproduce the example and it seems this is a bug in LispWorks (which I've reported to LW support). The new release doesn't really fix the problem (I can't do that), but it tries to deal with it in a more or less reasonable way. Please try it. Note that the new release is only relevant for LispWorks users. Users of other Lisps can as well keep 0.11.1. Thanks for the report, Edi. From edi at agharta.de Mon Jan 14 02:07:21 2008 From: edi at agharta.de (Edi Weitz) Date: Mon, 14 Jan 2008 03:07:21 +0100 Subject: [drakma-devel] END-OF-FILE In-Reply-To: (Victor Kryukov's message of "Sun, 13 Jan 2008 19:33:52 -0600") References: Message-ID: On Sun, 13 Jan 2008 19:33:52 -0600, "Victor Kryukov" wrote: > I've the following condition > > end of file on # > [Condition of type END-OF-FILE] > > while trying to do > > (drakma:http-request "http://www.bluishcoder.co.nz/atom.xml") > > Below is the relevant backtrace part: > > 0: (READ-CHAR # > T NIL #) > 1: (CHUNGA:READ-LINE* # {10050A5171}> NIL) > 2: (DRAKMA::READ-STATUS-LINE > # NIL) > 3: ((LABELS DRAKMA::FINISH-REQUEST) NIL NIL) > 4: (DRAKMA:HTTP-REQUEST "http://www.bluishcoder.co.nz/atom.xml") > > I can access that URI without any problems using my browser. I'm > slightly confused what's going on - could somebody please provide > any comments? http://weitz.de/drakma/#prob That does the trick for me. Edi. From victor.kryukov at gmail.com Mon Jan 14 02:16:04 2008 From: victor.kryukov at gmail.com (Victor Kryukov) Date: Sun, 13 Jan 2008 20:16:04 -0600 Subject: [drakma-devel] END-OF-FILE In-Reply-To: References: Message-ID: Thanks Edi - (let ((chunga:*accept-bogus-eols* t)) (drakma:http-request "http://www.bluishcoder.co.nz/atom.xml")) did the job. Best Regards, Vcitor. On Jan 13, 2008 8:07 PM, Edi Weitz wrote: > On Sun, 13 Jan 2008 19:33:52 -0600, "Victor Kryukov" wrote: > > > I've the following condition > > > > end of file on # > > [Condition of type END-OF-FILE] > > > > while trying to do > > > > (drakma:http-request "http://www.bluishcoder.co.nz/atom.xml") > > > > Below is the relevant backtrace part: > > > > 0: (READ-CHAR # > > T NIL #) > > 1: (CHUNGA:READ-LINE* # > {10050A5171}> NIL) > > 2: (DRAKMA::READ-STATUS-LINE > > # NIL) > > 3: ((LABELS DRAKMA::FINISH-REQUEST) NIL NIL) > > 4: (DRAKMA:HTTP-REQUEST "http://www.bluishcoder.co.nz/atom.xml") > > > > I can access that URI without any problems using my browser. I'm > > slightly confused what's going on - could somebody please provide > > any comments? > > http://weitz.de/drakma/#prob > > That does the trick for me. > > Edi. > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > -- Yours Sincerely, Victor Kryukov Chicago GSB class of 2008 773-618-9501 From ndj at hivsa.com Mon Jan 14 09:29:50 2008 From: ndj at hivsa.com (Nico de Jager) Date: Mon, 14 Jan 2008 11:29:50 +0200 Subject: [drakma-devel] New release 0.11.2 (Was: CHUNGA:INPUT-CHUNKING-UNEXPECTED-END-OF-FILE) In-Reply-To: (Edi Weitz's message of "Mon, 14 Jan 2008 03:02:16 +0100") References: <87ir346tah.fsf@davinci.hivsa.com> <87ve63jgvy.fsf@davinci.hivsa.com> Message-ID: <87wsqc4uwh.fsf@davinci.hivsa.com> Edi Weitz writes: > On Wed, 09 Jan 2008 14:57:37 +0200, Nico de Jager wrote: > Note that the new release is only relevant for LispWorks users. Users > of other Lisps can as well keep 0.11.1. Many thanks, Edi. But it appears that you forgot to upload the new version to your site (no, that's impossible - maybe you just decided to take a break at 3am and did not do it yet :-). Both asdf-install and a manual download still gives me version 0.11.1 (Just the change log on your site was updated). Thanks. Nico From edi at agharta.de Mon Jan 14 16:47:58 2008 From: edi at agharta.de (Edi Weitz) Date: Mon, 14 Jan 2008 17:47:58 +0100 Subject: [drakma-devel] New release 0.11.2 In-Reply-To: <87wsqc4uwh.fsf@davinci.hivsa.com> (Nico de Jager's message of "Mon, 14 Jan 2008 11:29:50 +0200") References: <87ir346tah.fsf@davinci.hivsa.com> <87ve63jgvy.fsf@davinci.hivsa.com> <87wsqc4uwh.fsf@davinci.hivsa.com> Message-ID: On Mon, 14 Jan 2008 11:29:50 +0200, Nico de Jager wrote: > But it appears that you forgot to upload the new version to your > site (no, that's impossible - maybe you just decided to take a break > at 3am and did not do it yet :-). Both asdf-install and a manual > download still gives me version 0.11.1 That's strange - I get the new one. See below. > (Just the change log on your site was updated). That's actually a good sign that the new tarball is online. The change log is automatically unpacked from the tarball and not uploaded separately. Edi. edi at groucho:/tmp$ wget http://weitz.de/files/drakma.tar.gz --17:45:21-- http://weitz.de/files/drakma.tar.gz => `drakma.tar.gz' Resolving weitz.de... 81.169.156.108 Connecting to weitz.de|81.169.156.108|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 42,464 (41K) [application/x-tar] 100%[=============================================================================================================>] 42,464 --.--K/s 17:45:21 (344.32 KB/s) - `drakma.tar.gz' saved [42464/42464] edi at groucho:/tmp$ tar vxzf drakma.tar.gz drakma-0.11.2/ drakma-0.11.2/CHANGELOG.txt drakma-0.11.2/cookies.lisp drakma-0.11.2/doc/ drakma-0.11.2/doc/index.html drakma-0.11.2/drakma.asd drakma-0.11.2/packages.lisp drakma-0.11.2/read.lisp drakma-0.11.2/request.lisp drakma-0.11.2/specials.lisp drakma-0.11.2/util.lisp edi at groucho:/tmp$ head drakma-0.11.2/CHANGELOG.txt Version 0.11.2 2008-01-14 Disable WRITE-TIMEOUT for LW5.0 if SSL is used (reported by Nico de Jager) Version 0.11.1 2007-10-11 Make Drakma work with AllegroCL's "modern" mode (patch by Ross Jekel) Needs at least Chunga 0.4.1 and FLEXI-STREAMS 0.13.1 Version 0.11.0 From edi at agharta.de Mon Jan 14 18:54:29 2008 From: edi at agharta.de (Edi Weitz) Date: Mon, 14 Jan 2008 19:54:29 +0100 Subject: [drakma-devel] New release 0.11.3 In-Reply-To: (Edi Weitz's message of "Mon, 14 Jan 2008 17:47:58 +0100") References: <87ir346tah.fsf@davinci.hivsa.com> <87ve63jgvy.fsf@davinci.hivsa.com> <87wsqc4uwh.fsf@davinci.hivsa.com> Message-ID: On Mon, 14 Jan 2008 17:47:58 +0100, Edi Weitz wrote: > That's strange - I get the new one. See below. But I've just released a new version anyway which "refines" the previous change a bit. Again, only relevant for LispWorks users. From ndj at hivsa.com Tue Jan 15 06:36:23 2008 From: ndj at hivsa.com (Nico de Jager) Date: Tue, 15 Jan 2008 08:36:23 +0200 Subject: [drakma-devel] New release 0.11.3 In-Reply-To: (Edi Weitz's message of "Mon, 14 Jan 2008 19:54:29 +0100") References: <87ir346tah.fsf@davinci.hivsa.com> <87ve63jgvy.fsf@davinci.hivsa.com> <87wsqc4uwh.fsf@davinci.hivsa.com> Message-ID: <873aszbno8.fsf@davinci.hivsa.com> Edi Weitz writes: > On Mon, 14 Jan 2008 17:47:58 +0100, Edi Weitz wrote: >> That's strange - I get the new one. See below. It appears that my ISP caches the binary file (see below). I get the new version if I dial-up with my mobile phone to another ISP. > But I've just released a new version anyway which "refines" the > previous change a bit. Again, only relevant for LispWorks users. It works!! If I were religious, you would be my God! What will the trade-off of the patch be in a production environment? Did LispWorks indicate that they will release a patch for this bug in their next release? Do you have a ticket number that I can track? I bought the Windows version specifically for this app, so I am a bit disappointed. Thanks again. Nico ndj at davinci:~/tmp$ date Tue Jan 15 08:09:58 SAST 2008 ndj at davinci:~/tmp$ wget http://weitz.de/files/drakma.tar.gz --08:10:14-- http://weitz.de/files/drakma.tar.gz => `drakma.tar.gz' Resolving weitz.de... 81.169.156.108 Connecting to weitz.de|81.169.156.108|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 42,282 (41K) [application/x-tar] 100%[=====================================================================================================================================================================>] 42,282 60.92K/s 08:10:14 (60.80 KB/s) - `drakma.tar.gz' saved [42282/42282] ndj at davinci:~/tmp$ tar xvzf drakma.tar.gz drakma-0.11.1/ drakma-0.11.1/CHANGELOG.txt drakma-0.11.1/cookies.lisp drakma-0.11.1/doc/ drakma-0.11.1/doc/index.html drakma-0.11.1/drakma.asd drakma-0.11.1/packages.lisp drakma-0.11.1/read.lisp drakma-0.11.1/request.lisp drakma-0.11.1/specials.lisp drakma-0.11.1/util.lisp ndj at davinci:~/tmp$ head drakma-0.11.1/CHANGELOG.txt Version 0.11.1 2007-10-11 Make Drakma work with AllegroCL's "modern" mode (patch by Ross Jekel) Needs at least Chunga 0.4.1 and FLEXI-STREAMS 0.13.1 Version 0.11.0 2007-10-01 Added *TEXT-CONTENT-TYPES* and *BODY-FORMAT-FUNCTION* (suggested by Peter Eddy) Version 0.10.2 From edi at agharta.de Tue Jan 15 06:47:45 2008 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Jan 2008 07:47:45 +0100 Subject: [drakma-devel] New release 0.11.3 In-Reply-To: <873aszbno8.fsf@davinci.hivsa.com> (Nico de Jager's message of "Tue, 15 Jan 2008 08:36:23 +0200") References: <87ir346tah.fsf@davinci.hivsa.com> <87ve63jgvy.fsf@davinci.hivsa.com> <87wsqc4uwh.fsf@davinci.hivsa.com> <873aszbno8.fsf@davinci.hivsa.com> Message-ID: On Tue, 15 Jan 2008 08:36:23 +0200, Nico de Jager wrote: > It appears that my ISP caches the binary file (see below). Strange. And they don't update the cache if the file changes upstream? Time to switch... > It works!! If I were religious, you would be my God! You're overdoing it a bit... :) > What will the trade-off of the patch be in a production environment? > Did LispWorks indicate that they will release a patch for this bug > in their next release? Do you have a ticket number that I can track? I'm going to answer that in a private email. Edi. From edi at agharta.de Tue Jan 15 06:50:20 2008 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Jan 2008 07:50:20 +0100 Subject: [drakma-devel] New release 0.11.3 In-Reply-To: <873aszbno8.fsf@davinci.hivsa.com> (Nico de Jager's message of "Tue, 15 Jan 2008 08:36:23 +0200") References: <87ir346tah.fsf@davinci.hivsa.com> <87ve63jgvy.fsf@davinci.hivsa.com> <87wsqc4uwh.fsf@davinci.hivsa.com> <873aszbno8.fsf@davinci.hivsa.com> Message-ID: On Tue, 15 Jan 2008 08:36:23 +0200, Nico de Jager wrote: > What will the trade-off of the patch be in a production environment? Oh, I forgot - you can of course always implement a write timeout manually if you depend on it. See for example the WITH-TIMEOUT macro in Hunchentoot's port-lw.lisp. From jcm at sdf.lonestar.org Wed Jan 16 14:13:22 2008 From: jcm at sdf.lonestar.org (Jonathon McKitrick) Date: Wed, 16 Jan 2008 14:13:22 +0000 Subject: [drakma-devel] Odd LW error not in SBCL In-Reply-To: References: <20080111193856.GB11819@SDF.LONESTAR.ORG> Message-ID: <20080116141322.GA9784@SDF.LONESTAR.ORG> On Fri, Jan 11, 2008 at 11:48:10PM +0100, Edi Weitz wrote: : On Fri, 11 Jan 2008 19:38:56 +0000, Jonathon McKitrick wrote: : : > I'm running a drakma-based app that gives an error on LispWorks, but : > not on SBCL. : > : > Error: End of file while reading stream #. : > : > This is after a POST request, and the same error never occurs with : > SBCL. Is there something else I should be setting when calling : > http-request in LW versus SBCL? : : No, not really. If SBCL and LispWorks don't behave the same, then I'd : say it's a bug. Do you have a URL and a way to reproduce this? Before I set up a URL that could be tested, I decided to try everything on Win32 first, since that is my deployment platform and where the error would matter most. I also added a :read-timeout value. So far, the error has not yet appeared. Not sure if it matters at this point, but the error occurs with https, no http. Jonathon McKitrick -- 'Java is a fine language, for low values of fine.' From edi at agharta.de Wed Jan 16 16:56:38 2008 From: edi at agharta.de (Edi Weitz) Date: Wed, 16 Jan 2008 17:56:38 +0100 Subject: [drakma-devel] Odd LW error not in SBCL In-Reply-To: <20080116141322.GA9784@SDF.LONESTAR.ORG> (Jonathon McKitrick's message of "Wed, 16 Jan 2008 14:13:22 +0000") References: <20080111193856.GB11819@SDF.LONESTAR.ORG> <20080116141322.GA9784@SDF.LONESTAR.ORG> Message-ID: On Wed, 16 Jan 2008 14:13:22 +0000, Jonathon McKitrick wrote: > Before I set up a URL that could be tested, I decided to try > everything on Win32 first, since that is my deployment platform and > where the error would matter most. I also added a :read-timeout > value. So far, the error has not yet appeared. Not sure if it > matters at this point, but the error occurs with https, no http. Have you looked at the other thread from a few days ago? Do you use the newest version of Drakma? From jcm at sdf.lonestar.org Wed Jan 16 22:03:26 2008 From: jcm at sdf.lonestar.org (Jonathon McKitrick) Date: Wed, 16 Jan 2008 22:03:26 +0000 Subject: [drakma-devel] Odd LW error not in SBCL In-Reply-To: References: <20080111193856.GB11819@SDF.LONESTAR.ORG> <20080116141322.GA9784@SDF.LONESTAR.ORG> Message-ID: <20080116220326.GA20149@SDF.LONESTAR.ORG> On Wed, Jan 16, 2008 at 05:56:38PM +0100, Edi Weitz wrote: : On Wed, 16 Jan 2008 14:13:22 +0000, Jonathon McKitrick wrote: : : > Before I set up a URL that could be tested, I decided to try : > everything on Win32 first, since that is my deployment platform and : > where the error would matter most. I also added a :read-timeout : > value. So far, the error has not yet appeared. Not sure if it : > matters at this point, but the error occurs with https, no http. : : Have you looked at the other thread from a few days ago? Do you use : the newest version of Drakma? I've been away from the list for a week or so, but I did see it. That might actually solve the problem as well. I see the change in WRITE-TIMEOUT for SSL as well, but I only use READ-TIMEOUT, and based on the thread you mentioned, I might be able to remove that as well. Jonathon McKitrick -- 'Java is a fine language, for low values of fine.' From edi at agharta.de Wed Jan 16 22:10:37 2008 From: edi at agharta.de (Edi Weitz) Date: Wed, 16 Jan 2008 23:10:37 +0100 Subject: [drakma-devel] Odd LW error not in SBCL In-Reply-To: <20080116220326.GA20149@SDF.LONESTAR.ORG> (Jonathon McKitrick's message of "Wed, 16 Jan 2008 22:03:26 +0000") References: <20080111193856.GB11819@SDF.LONESTAR.ORG> <20080116141322.GA9784@SDF.LONESTAR.ORG> <20080116220326.GA20149@SDF.LONESTAR.ORG> Message-ID: On Wed, 16 Jan 2008 22:03:26 +0000, Jonathon McKitrick wrote: > I've been away from the list for a week or so, but I did see it. > That might actually solve the problem as well. I see the change in > WRITE-TIMEOUT for SSL as well, but I only use READ-TIMEOUT, and > based on the thread you mentioned, I might be able to remove that as > well. If you need to remove the read timeout or if you need to do anything else to make this work on LispWorks (except for just using the latest release), I'd like to hear about it. Thanks, Edi.