From edi at agharta.de Thu Aug 5 19:32:48 2010 From: edi at agharta.de (Edi Weitz) Date: Thu, 5 Aug 2010 21:32:48 +0200 Subject: [drakma-devel] New release 1.2.3 [Was: duplicate cookies problem with proposed patch] Message-ID: Thanks for the patch. I'm back from vacation now and I've just released 1.2.3 which fixes this. Edi. On Thu, Jul 29, 2010 at 11:22 AM, Vsevolod Dyomkin wrote: > Hi, > > I want to re-raise the topic of duplicate cookies.? I've had this issue with > the older version of Drakma (1.1.0) and was unaware of the patch with > *remove-duplicate-cookies-p*. > But investigating the problem (before I've read the discussion in the > mailing list), I've encountered it's cause in the source code, that is > highlighted in the attached diff.? The problem is, that SET-DIFFERENCE and > UNION are not supplied COOKIE= tests in UPDATE-COOKIES. > > It still remains in the current version (1.2.2) and can be tested like this: > > CL-USER> (defvar *cookies* (make-instance 'drakma:cookie-jar)) > *COOKIES* > CL-USER> (drakma::update-cookies (list (make-instance 'drakma:cookie :name > "lang" :value "en" :domain "site.com" :path "/") > ????????????????????????????????????? (make-instance 'drakma:cookie :name > "lang" :value "en" :domain "site.com" :path "/")) > ??????????????????????????????? *cookies*) > # > > I think, that this is a bug, because without the TEST argument, for example, > SET-DIFFERENCE in this case will constantly return the first set (see > below), so either the code should be simplified or the test argument should > be added. > > CL-USER> (set-difference (list (make-instance 'drakma:cookie :name "lang" > :value "en" :domain "site.com" :path "/") > ????????????????????????????? (make-instance 'drakma:cookie :name "lang" > :value "en" :domain "site.com" :path "/")) > ??????????????????????? (list (make-instance 'drakma:cookie :name "lang" > :value "en" :domain "site.com" :path "/") > ????????????????????????????? (make-instance 'drakma:cookie :name "lang" > :value "en" :domain "site.com" :path "/"))) > (# > ?#) > > So, I believe, that this part should also be fixed, especially, since > UPDATE-COOKIES is called alongside with GET-COOKIES. > > Best regards, > Vsevolod > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > From reddaly at gmail.com Fri Aug 6 23:29:44 2010 From: reddaly at gmail.com (Red Daly) Date: Fri, 6 Aug 2010 16:29:44 -0700 Subject: [drakma-devel] SOCKS5 proxy support Message-ID: I have modified Drakma to use a SOCKS5 proxy if desired. Before I submit a patch I'd like to know what is the preferred interface for this: 1. Modify http-request with a SOCKS-PROXY option analogous to the PROXY option. Introduce SOCKS5 protocol code (about 200 lines) into hunchentoot and rely on no external libraries 2. Modify http-request with a SOCKS-PROXY option analogous to the PROXY option. Introduce a dependency on an external SOCKS5 library. 3. Modify Drakma in some way that allows a user to establish a socks-proxy connection without explicitly supporting this in Drakma itself. The implementation requires that instead of establishing a socket connection to HOST/PORT, the socket connects to SOCKS-HOST/SOCKS-PORT instead and then sets up the socket to forward to HOST/PORT. The implementation is available here: http://github.com/gonzojive/drakma/tree/socks socks5 spec: http://www.faqs.org/rfcs/rfc1928.html Red From edi at agharta.de Sat Aug 7 20:26:08 2010 From: edi at agharta.de (Edi Weitz) Date: Sat, 7 Aug 2010 22:26:08 +0200 Subject: [drakma-devel] SOCKS5 proxy support In-Reply-To: References: Message-ID: Hi Red, First of all, thanks for this, sounds good. Could you show us the diff somehow so that it's easier to see what exactly you've added and how? Edi. On Sat, Aug 7, 2010 at 1:29 AM, Red Daly wrote: > I have modified Drakma to use a SOCKS5 proxy if desired. ?Before I > submit a patch I'd like to know what is the preferred interface for > this: > > 1. ?Modify http-request with a SOCKS-PROXY option analogous to the > PROXY option. ?Introduce SOCKS5 protocol code ?(about 200 lines) into > hunchentoot and rely on no external libraries > > 2. ?Modify http-request with a SOCKS-PROXY option analogous to the > PROXY option. ?Introduce a dependency on an external SOCKS5 library. > > 3. ?Modify Drakma in some way that allows a user to establish a > socks-proxy connection without explicitly supporting this in Drakma > itself. > > The implementation requires that instead of establishing a socket > connection to HOST/PORT, the socket connects to SOCKS-HOST/SOCKS-PORT > instead and then sets up the socket to forward to HOST/PORT. > > The implementation is available here: > http://github.com/gonzojive/drakma/tree/socks > > socks5 spec: http://www.faqs.org/rfcs/rfc1928.html > > Red > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > From reddaly at gmail.com Sat Aug 7 23:09:00 2010 From: reddaly at gmail.com (Red Daly) Date: Sat, 7 Aug 2010 16:09:00 -0700 Subject: [drakma-devel] SOCKS5 proxy support In-Reply-To: References: Message-ID: Sure, http://github.com/gonzojive/drakma/commit/869007460ae2eb804bcd1600faacf9bda27e3709 contains a diff. I also attached one. - Red On Sat, Aug 7, 2010 at 1:26 PM, Edi Weitz wrote: > Hi Red, > > First of all, thanks for this, sounds good. ?Could you show us the > diff somehow so that it's easier to see what exactly you've added and > how? > > Edi. > > > On Sat, Aug 7, 2010 at 1:29 AM, Red Daly wrote: >> I have modified Drakma to use a SOCKS5 proxy if desired. ?Before I >> submit a patch I'd like to know what is the preferred interface for >> this: >> >> 1. ?Modify http-request with a SOCKS-PROXY option analogous to the >> PROXY option. ?Introduce SOCKS5 protocol code ?(about 200 lines) into >> hunchentoot and rely on no external libraries >> >> 2. ?Modify http-request with a SOCKS-PROXY option analogous to the >> PROXY option. ?Introduce a dependency on an external SOCKS5 library. >> >> 3. ?Modify Drakma in some way that allows a user to establish a >> socks-proxy connection without explicitly supporting this in Drakma >> itself. >> >> The implementation requires that instead of establishing a socket >> connection to HOST/PORT, the socket connects to SOCKS-HOST/SOCKS-PORT >> instead and then sets up the socket to forward to HOST/PORT. >> >> The implementation is available here: >> http://github.com/gonzojive/drakma/tree/socks >> >> socks5 spec: http://www.faqs.org/rfcs/rfc1928.html >> >> Red >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > -------------- next part -------------- A non-text attachment was scrubbed... Name: socks-proxy.diff Type: text/x-patch Size: 14945 bytes Desc: not available URL: From edi at agharta.de Sun Aug 8 15:16:16 2010 From: edi at agharta.de (Edi Weitz) Date: Sun, 8 Aug 2010 17:16:16 +0200 Subject: [drakma-devel] SOCKS5 proxy support In-Reply-To: References: Message-ID: Thanks. Generally, that looks fine to me except for a few stylistic changes I'd like to have. I think that what you have now (i.e. #1 from the three options) is the best way to integrate this with Drakma. I'm not too familiar with SOCKS5, so I'll have to trust you that this works and doesn't break anything else. As for style issues, here are some: 1. The new package should be defined in packages.lisp. 2. All calls to error should use defined and exported conditions, either inherited from drakma-condition or from a new base class socks5-condition. 3. HTML documentation and integration with the system definition is missing from the diff. See also here: http://weitz.de/patches.html Thanks again, Edi. On Sun, Aug 8, 2010 at 1:09 AM, Red Daly wrote: > Sure, > > http://github.com/gonzojive/drakma/commit/869007460ae2eb804bcd1600faacf9bda27e3709 > contains a diff. ?I also attached one. > > - Red > > On Sat, Aug 7, 2010 at 1:26 PM, Edi Weitz wrote: >> Hi Red, >> >> First of all, thanks for this, sounds good. ?Could you show us the >> diff somehow so that it's easier to see what exactly you've added and >> how? >> >> Edi. >> >> >> On Sat, Aug 7, 2010 at 1:29 AM, Red Daly wrote: >>> I have modified Drakma to use a SOCKS5 proxy if desired. ?Before I >>> submit a patch I'd like to know what is the preferred interface for >>> this: >>> >>> 1. ?Modify http-request with a SOCKS-PROXY option analogous to the >>> PROXY option. ?Introduce SOCKS5 protocol code ?(about 200 lines) into >>> hunchentoot and rely on no external libraries >>> >>> 2. ?Modify http-request with a SOCKS-PROXY option analogous to the >>> PROXY option. ?Introduce a dependency on an external SOCKS5 library. >>> >>> 3. ?Modify Drakma in some way that allows a user to establish a >>> socks-proxy connection without explicitly supporting this in Drakma >>> itself. >>> >>> The implementation requires that instead of establishing a socket >>> connection to HOST/PORT, the socket connects to SOCKS-HOST/SOCKS-PORT >>> instead and then sets up the socket to forward to HOST/PORT. >>> >>> The implementation is available here: >>> http://github.com/gonzojive/drakma/tree/socks >>> >>> socks5 spec: http://www.faqs.org/rfcs/rfc1928.html >>> >>> Red >>> >>> _______________________________________________ >>> drakma-devel mailing list >>> drakma-devel at common-lisp.net >>> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >>> >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > From reddaly at gmail.com Sun Aug 8 19:01:57 2010 From: reddaly at gmail.com (Red Daly) Date: Sun, 8 Aug 2010 12:01:57 -0700 Subject: [drakma-devel] SOCKS5 proxy support In-Reply-To: References: Message-ID: Great. I was planning to make most of those changes anyway, so I will send a patch in when I have a chance. Red On Sun, Aug 8, 2010 at 8:16 AM, Edi Weitz wrote: > Thanks. ?Generally, that looks fine to me except for a few stylistic > changes I'd like to have. ?I think that what you have now (i.e. #1 > from the three options) is the best way to integrate this with Drakma. > ?I'm not too familiar with SOCKS5, so I'll have to trust you that this > works and doesn't break anything else. > > As for style issues, here are some: > > 1. The new package should be defined in packages.lisp. > > 2. All calls to error should use defined and exported conditions, > either inherited from drakma-condition or from a new base class > socks5-condition. > > 3. HTML documentation and integration with the system definition is > missing from the diff. > > See also here: http://weitz.de/patches.html > > Thanks again, > Edi. > > > > On Sun, Aug 8, 2010 at 1:09 AM, Red Daly wrote: >> Sure, >> >> http://github.com/gonzojive/drakma/commit/869007460ae2eb804bcd1600faacf9bda27e3709 >> contains a diff. ?I also attached one. >> >> - Red >> >> On Sat, Aug 7, 2010 at 1:26 PM, Edi Weitz wrote: >>> Hi Red, >>> >>> First of all, thanks for this, sounds good. ?Could you show us the >>> diff somehow so that it's easier to see what exactly you've added and >>> how? >>> >>> Edi. >>> >>> >>> On Sat, Aug 7, 2010 at 1:29 AM, Red Daly wrote: >>>> I have modified Drakma to use a SOCKS5 proxy if desired. ?Before I >>>> submit a patch I'd like to know what is the preferred interface for >>>> this: >>>> >>>> 1. ?Modify http-request with a SOCKS-PROXY option analogous to the >>>> PROXY option. ?Introduce SOCKS5 protocol code ?(about 200 lines) into >>>> hunchentoot and rely on no external libraries >>>> >>>> 2. ?Modify http-request with a SOCKS-PROXY option analogous to the >>>> PROXY option. ?Introduce a dependency on an external SOCKS5 library. >>>> >>>> 3. ?Modify Drakma in some way that allows a user to establish a >>>> socks-proxy connection without explicitly supporting this in Drakma >>>> itself. >>>> >>>> The implementation requires that instead of establishing a socket >>>> connection to HOST/PORT, the socket connects to SOCKS-HOST/SOCKS-PORT >>>> instead and then sets up the socket to forward to HOST/PORT. >>>> >>>> The implementation is available here: >>>> http://github.com/gonzojive/drakma/tree/socks >>>> >>>> socks5 spec: http://www.faqs.org/rfcs/rfc1928.html >>>> >>>> Red >>>> >>>> _______________________________________________ >>>> drakma-devel mailing list >>>> drakma-devel at common-lisp.net >>>> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >>>> >>> >>> _______________________________________________ >>> drakma-devel mailing list >>> drakma-devel at common-lisp.net >>> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >>> >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> >> > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >