Hi!

Using latest polipo git version
(b92db574c11961f681fa258314bd7470e4449cc0), with the following patch
(kindly provided by Juliusz; for a specific situation I need that all
the HTTP requests are sent with Pragma: no-cache), I saw that polipo
was crashing.


diff --git a/server.c b/server.c
index d59d772..c9ce192 100644
--- a/server.c
+++ b/server.c
@@ -1653,7 +1653,8 @@ httpWriteRequest(HTTPConnectionPtr connection, HTTPRequest
     }

     n = httpPrintCacheControl(connection->reqbuf, n, bufsize,
-                              alwaysAddNoTransform ? CACHE_NO_TRANSFORM : 0,
+                              ((alwaysAddNoTransform ? CACHE_NO_TRANSFORM : 0)
+                               CACHE_NO),
                              &request->cache_control);
     if(n < 0)
         goto fail;

A gdb output is attached (I hope that it helps).

Also, I am seeing a lot of this in polipo's logfile (with the default
0x7 value):

Couldn't parse date: Fri, 14 Jan 201; 02:12:56 GMT
Couldn't parse last-modified: Fri, 15 Oct 201: 18:41:08 GMT
Couldn't parse date: Fri, 14 Jan 201; 02:12:56 GMT
Couldn't parse last-modified: Fri, 17 Sep 201: 13:31:30 GMT
Couldn't parse date: Fri, 14 Jan 201; 02:12:56 GMT
Couldn't parse last-modified: Wed, 15 Sep 201: 21:33:42 GMT
Couldn't parse date: Fri, 14 Jan 201; 02:12:56 GMT
Couldn't parse last-modified: Fri, 17 Sep 201: 13:31:30 GMT
Couldn't parse date: Fri, 14 Jan 201; 02:12:56 GMT
Couldn't parse last-modified: Sat, 18 Sep 201: 01:24:32 GMT
(...)

What could be causing this, please?

Thank you very much!

Best regards,
Nelson
Starting program: /usr/bin/polipo 

Program received signal SIGPIPE, Broken pipe.
0xb7fe2424 in __kernel_vsyscall ()

Thread 1 (process 4142):
#0  0xb7fe2424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7f44fb3 in __write_nocancel () at ../sysdeps/unix/syscall-template.S:82
No locals.
#2  0x0804da62 in do_scheduled_stream (status=0, event=0x808bf68) at io.c:355
        request = 0x808bf78
        rc = 134791032
        done = -1073744880
        i = 1
        iov = {{iov_base = 0xb7e3b000, iov_len = 685}, {iov_base = 0x0, 
            iov_len = 3221222328}, {iov_base = 0xb7ef7c8c, 
            iov_len = 3221222428}, {iov_base = 0xb7ef569e, 
            iov_len = 4294967295}, {iov_base = 0x0, iov_len = 0}, {
            iov_base = 0x0, iov_len = 0}}
        chunk_header_len = 1380065328
        chunk_header = "\374\267\000\340\343\267\346\001\000"
        len12 = 685
        len123 = 685
        __PRETTY_FUNCTION__ = "do_scheduled_stream"
#3  0x0804d448 in schedule_stream (operation=1, fd=22, offset=0, header=0x0, 
    hlen=0, 
    buf=0xb7e3b000 "HTTP/1.1 500 Connection finishing\r\nConnection: 
keep-alive\r\nDate: Fri, 14 Jan 2011 01:20:00 GMT\r\nContent-Type: 
text/html\r\nContent-Length: 486\r\nExpires: 0\r\nCache-Control: 
no-cache\r\nPragma: no-cache\r\n\r\n<"..., len=685, buf2=0x0, len2=0, buf3=0x0, 
len3=0, buf_location=0x0, 
    handler=0x8062079 <httpErrorNocloseStreamHandler>, data=0x808c340)
    at io.c:205
        request = {operation = 1, fd = 22, offset = 0, len = 685, len2 = 0, 
          u = {h = {hlen = 0, header = 0x0}, b = {len3 = 0, buf3 = 0x0}, l = {
              buf_location = 0x0}}, 
          buf = 0xb7e3b000 "HTTP/1.1 500 Connection finishing\r\nConnection: 
keep-alive\r\nDate: Fri, 14 Jan 2011 01:20:00 GMT\r\nContent-Type: 
text/html\r\nContent-Length: 486\r\nExpires: 0\r\nCache-Control: 
no-cache\r\nPragma: no-cache\r\n\r\n<"..., buf2 = 0x0, handler = 0x8062079 
<httpErrorNocloseStreamHandler>, 
          data = 0x808c340}
        event = 0x808bf68
        done = 134528128
        __PRETTY_FUNCTION__ = "schedule_stream"
#4  0x0804ced1 in do_stream (operation=1, fd=22, offset=0, 
    buf=0xb7e3b000 "HTTP/1.1 500 Connection finishing\r\nConnection: 
keep-alive\r\nDate: Fri, 14 Jan 2011 01:20:00 GMT\r\nContent-Type: 
text/html\r\nContent-Length: 486\r\nExpires: 0\r\nCache-Control: 
no-cache\r\nPragma: no-cache\r\n\r\n<"..., len=685, handler=0x8062079 
<httpErrorNocloseStreamHandler>, data=0x808c340)
    at io.c:69
        __PRETTY_FUNCTION__ = "do_stream"
#5  0x08061e0c in httpClientRawErrorHeaders (connection=0x808c340, code=500, 
    message=0x808be30, close=0, headers=0x0) at client.c:490
        fd = 22
        n = 685
        url = 0x808e878 "http://SITE.WAS.HERE";
        url_len = 43
        etag = 0x0
        __PRETTY_FUNCTION__ = "httpClientRawErrorHeaders"
#6  0x08061e45 in httpClientRawError (connection=0x808c340, code=500, 
    message=0x808be30, close=0) at client.c:503
No locals.
#7  0x080648b3 in httpServeObject (connection=0x808c340) at client.c:1606
        request = 0x808e780
        object = 0x808e800
        i = 0
        j = 0
        n = 134535987
        len = -1208175712
        rc = -1208180748
        bufsize = 4096
        condition_result = 134528827
#8  0x080653ea in httpServeObjectDelayed (event=0x808bd20) at client.c:1840
        connection = 0x808c340
#9  0x0804c3d2 in runTimeEventQueue () at event.c:492
        event = 0x808bd20
        done = 20
        __PRETTY_FUNCTION__ = "runTimeEventQueue"
#10 0x0804c853 in eventLoop () at event.c:654
        sleep_time = {tv_sec = 0, tv_usec = 0}
        timeout = {tv_sec = 44, tv_usec = 810854}
        rc = 2
        i = 9
        done = 1
        n = 1
        event = 0x808bf68
        fd0 = 11
#11 0x08059ea2 in main (argc=1, argv=0xbffff754) at main.c:165
        listener = 0x8089700
        i = 1
        rc = 1
        expire = 0
        printConfig = 0
A debugging session is active.

        Inferior 1 [process 4142] will be killed.

Quit anyway? (y or n) 
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Polipo-users mailing list
Polipo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/polipo-users

Reply via email to