Re: Release date for Privoxy 3.0.20 beta

Fabian Keil <[email protected]>
Newsgroups gmane.comp.web.privoxy.devel
Message-ID <[email protected]>
Lee <[email protected]> wrote:

> On 12/29/12, Fabian Keil <[email protected]> wrote:
> > I believe there are enough changes in CVS to warrant a new release.
> >
> > As several of the changes are HTTP-related and affect pretty
> > much every request, I think it should be a beta.
> >
> > I propose we release Privoxy 3.0.20 beta in the middle of
> > January and 3.0.21 stable a couple of weeks later.
> >
> > At least the beta may also be a good opportunity to enable
> > keep-alive-timeout and tolerate-pipelining in the default
> > config.
> >
> > Any opinions?
> 
> I don't think the windows version is ready for beta :(
> 
> I apologize - I haven't been keeping up with the changes being made to
> Privoxy.  I just tried the latest from CVS and it tends to hang the
> browser.  This hangs consistently:

Oops.

> restart privoxy, restart firefox, clear the cache, go here
>   http://www.microsoft.com/en-us/download/default.aspx
> then click on the link for the directx download
>   http://www.microsoft.com/en-us/download/details.aspx?id=35
> 
> The 2nd page never displays
> 
> I'll send the log + my config in a unicast

Thanks.

Please try the attached patch. If it doesn't help, please temporarily
reduce drain_and_close_socket() to the close_socket() call at the end.

My impression is that draining sockets when there is no data
available causes problems:

fk@r500 /tmp/privoxy-logs $privoxy-log-parser.pl --shorten-thread-ids privoxy-hang.txt  | grep 001 | tail -n 2
12:26:13.335 001 Connect: Closing client socket 256. Keep-alive: 1. Socket alive: 1. Data available: 0. Configuration file change detected: 0. Requests received: 5.
12:36:21.583 001 Connect: Drained 559 bytes before closing socket 256

It looks like Privoxy is waiting on the socket until new data arrives,
while the intended behaviour is to merely drain whatever data is available
at the time the function is called and otherwise close the socket right
away.

Fabian

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412

_______________________________________________
Ijbswa-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ijbswa-developers
0001-Do-not-try-to-drain-sockets-with-no-data-available.patch (text/x-patch, 700 B)
From e6e5d85a25203b46d803de82aaf225d7a4424a6c Mon Sep 17 00:00:00 2001
From: Fabian Keil <[email protected]>
Date: Mon, 31 Dec 2012 20:49:38 +0100
Subject: [PATCH] Do not try to drain sockets with no data available

---
 jbsockets.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/jbsockets.c b/jbsockets.c
index 1c96dcf..58f175f 100644
--- a/jbsockets.c
+++ b/jbsockets.c
@@ -779,6 +779,11 @@ void drain_and_close_socket(jb_socket fd)
       {
          char drainage[500];
 
+         if (data_is_available(fd, 0))
+         {
+            break;
+         }
+
          bytes_drained = read_socket(fd, drainage, sizeof(drainage));
          if (bytes_drained < 0)
          {
-- 
1.8.0.2
signature.asc (application/pgp-signature, 196 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlDh8KsACgkQBYqIVf93VJ2UYQCglOt4cUX6SG8jRpM6YwaQD7Kq
xQcAoKb1HyCDb9CyB4j9TVDUbx6SZbqR
=sT2P
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.