> Smells like a bug to me. To help us track it down, could you please > rebuild snap-core with "-fdebug", rebuild snap-server and your app, > and run your app with "DEBUG=1" set in the environment? It would be > useful to see the debugging output.
Pasted at the bottom, both with and without POST data. Where it goes from 10 to 9, with the "timeoutThread: woke up", it seemed to want to do that forever until I killed curl. At that point, snap went from 9 to 10, and then 10 to 9, and then stopped printing. GET works fine, but if you want a printout of that, I can send it as well. As an aside, and totally off-topic, it seems like whenever I do a cabal update, I wind up having to wipe out my entire ~/.ghc and ~/.cabal and begin from scratch, because half my modules rely on some old version of an updated module, which doesn't exist anymore, and everything's all hosed. Is that normal? without POST data: Listening on http://0.0.0.0:8000/ [ 3] Server: Server.httpServe: START (EventLoopSimple) [ 3] bindHttp: binding port 0.0.0.0:8000 [ 3] bindHttp: bound socket <socket: 7> [ 3] simpleEventLoop: waiting for mvars [ 8] acceptThread: calling accept() on socket ListenHttp (<socket: 7>) [ 9] timeoutThread: waiting for activity on thread table [ 8] acceptThread: accepted connection from remote: 127.0.0.1:52788 [ 8] acceptThread: calling accept() on socket ListenHttp (<socket: 7>) [ 10] Backend.withConnection: running session: 127.0.0.1:52788 [ 10] Backend.tickleTimeout [ 10] runHTTP/go: prepping iteratee for start [ 10] httpSession iteratee: BEGIN [ 10] Server.httpSession: entered [ 10] receiveRequest: entered [ 10] parseRequest: BEGIN [ 10] parseRequest: continue [ 10] httpSession iteratee: continue [ 10] runHTTP/go: running... [ 10] SimpleBackend.enumerate(8): reading from socket [ 10] SimpleBackend.enumerate(8): got 149 bytes from read end [ 10] SimpleBackend.enumerate(8): sending "POST /echo/hi HTTP/1.1\r\nUser-Agent: curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.3\r\nHost: localhost:8000\r\nAccept: */*\r\n\r\n" to continuation [ 10] httpSession iteratee: got chunk: ["\"POST /echo/hi HTTP/1.1\\r\\nUser-Agent: curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.3\\r\\nHost: localhost:8000\\r\\nAccept: */*\\r\\n\\r\\n\""] [ 10] parseRequest: got chunk: ["\"POST /echo/hi HTTP/1.1\\r\\nUser-Agent: curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.3\\r\\nHost: localhost:8000\\r\\nAccept: */*\\r\\n\\r\\n\""] [ 10] parseRequest: yield, with remainder Chunks [] [ 10] receiveRequest: parseRequest returned [ 10] receiveRequest/setEnumerator: request did NOT have content-length [ 10] receiveRequest/setEnumerator: body enumerator set [ 10] Server.httpSession: receiveRequest finished [ 10] Backend.tickleTimeout [ 10] Server.httpSession: got request: POST /echo/hi (1,1) [ 10] withCompression', content-type is Just "text/html;charset=utf-8" [ 10] Server.httpSession: finished running user handler [ 10] Server.httpSession: handled, skipping request body [ 10] httpSession/skipToEof: BEGIN [ 10] httpSession/skipToEof: continue [ 10] httpSession iteratee: continue [ 10] SimpleBackend.enumerate(8): got continue [ 10] SimpleBackend.enumerate(8): reading from socket [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 10] SimpleBackend.enumerate(8): got EOF from socket [ 10] SimpleBackend.enumerate(8): sending EOF to continuation [ 10] httpSession iteratee: got EOF [ 10] httpSession/skipToEof: got EOF [ 10] Server.httpSession: request body skipped, sending response [ 10] sendResponse: whenEnum: enumerating bytes [ 10] countBytes writeEnd: BEGIN [ 10] writeEnd: BEGIN [ 10] writeEnd: continue [ 10] countBytes writeEnd: continue [ 10] countBytes writeEnd: got chunk: ["\"HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=utf-8\\r\\nDate: Wed, 16 Mar 2011 02:25:03 GMT\\r\\nServer: Snap/0.4.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n00F5\\r\\n<html>\\n <head>\\n <title>Echo Page</title>\\n </head>\\n <body>\\n <div id='content'>\\n <h1>Is there an echo in here?</h1>\\n </div>\\n <p>You wanted me to say this?</p>\\n <p>\\\"hi\\\"</p>\\n <p><a href='/'>Return</a></p>\\n </body>\\n</html>\\n\\r\\n0\\r\\n\\r\\n\""] [ 10] writeEnd: got chunk: ["\"HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=utf-8\\r\\nDate: Wed, 16 Mar 2011 02:25:03 GMT\\r\\nServer: Snap/0.4.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n00F5\\r\\n<html>\\n <head>\\n <title>Echo Page</title>\\n </head>\\n <body>\\n <div id='content'>\\n <h1>Is there an echo in here?</h1>\\n </div>\\n <p>You wanted me to say this?</p>\\n <p>\\\"hi\\\"</p>\\n <p><a href='/'>Return</a></p>\\n </body>\\n</html>\\n\\r\\n0\\r\\n\\r\\n\""] [ 10] SimpleBackend.writeOut(8): got chunk with 401 bytes [ 10] SimpleBackend.writeOut(8): wrote 401 bytes, last 10="l>\n\r\n0\r\n\r\n" [ 10] writeEnd: continue [ 10] countBytes writeEnd: continue [ 10] countBytes writeEnd: got EOF [ 10] writeEnd: got EOF [ 10] sendResponse: whenEnum: 401 bytes enumerated [ 10] sendResponse: response sent [ 10] Server.httpSession: sent 258 bytes [ 10] Server.httpSession: entered [ 10] receiveRequest: entered [ 10] parseRequest: BEGIN [ 10] parseRequest: continue [ 10] Server: [127.0.0.1]: error: enumEOF: divergent iteratee [ 10] thread killed, closing socket [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table with POST data: [ 3] Server: Server.httpServe: START (EventLoopSimple) [ 3] bindHttp: binding port 0.0.0.0:8000 [ 3] bindHttp: bound socket <socket: 7> [ 3] simpleEventLoop: waiting for mvars [ 8] acceptThread: calling accept() on socket ListenHttp (<socket: 7>) [ 9] timeoutThread: waiting for activity on thread table [ 8] acceptThread: accepted connection from remote: 127.0.0.1:39281 [ 8] acceptThread: calling accept() on socket ListenHttp (<socket: 7>) [ 10] Backend.withConnection: running session: 127.0.0.1:39281 [ 10] Backend.tickleTimeout [ 10] runHTTP/go: prepping iteratee for start [ 10] httpSession iteratee: BEGIN [ 10] Server.httpSession: entered [ 10] receiveRequest: entered [ 10] parseRequest: BEGIN [ 10] parseRequest: continue [ 10] httpSession iteratee: continue [ 10] runHTTP/go: running... [ 10] SimpleBackend.enumerate(8): reading from socket [ 10] SimpleBackend.enumerate(8): got 220 bytes from read end [ 10] SimpleBackend.enumerate(8): sending "POST /echo/hi HTTP/1.1\r\nUser-Agent: curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.3\r\nHost: localhost:8000\r\nAccept: */*\r\nContent-Length: 3\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\na=b" to continuation [ 10] httpSession iteratee: got chunk: ["\"POST /echo/hi HTTP/1.1\\r\\nUser-Agent: curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.3\\r\\nHost: localhost:8000\\r\\nAccept: */*\\r\\nContent-Length: 3\\r\\nContent-Type: application/x-www-form-urlencoded\\r\\n\\r\\na=b\""] [ 10] parseRequest: got chunk: ["\"POST /echo/hi HTTP/1.1\\r\\nUser-Agent: curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.3\\r\\nHost: localhost:8000\\r\\nAccept: */*\\r\\nContent-Length: 3\\r\\nContent-Type: application/x-www-form-urlencoded\\r\\n\\r\\na=b\""] [ 10] parseRequest: yield, with remainder Chunks ["\"a=b\""] [ 10] receiveRequest: parseRequest returned [ 10] receiveRequest/setEnumerator: request had content-length 3 [ 10] receiveRequest/setEnumerator: body enumerator set [ 10] parseForm: got application/x-www-form-urlencoded [ 10] parseForm: reading POST body [ 10] rqBody iterator: BEGIN [ 10] rqBody iterator: continue [ 10] rqBody iterator: got chunk: ["\"a=b\""] [ 10] rqBody iterator: continue [ 10] rqBody iterator: got EOF [ 10] parseForm: stuffing 'enumBS body' into request [ 10] Server.httpSession: receiveRequest finished [ 10] Backend.tickleTimeout [ 10] Server.httpSession: got request: POST /echo/hi (1,1) [ 10] withCompression', content-type is Just "text/html;charset=utf-8" [ 10] Server.httpSession: finished running user handler [ 10] Server.httpSession: handled, skipping request body [ 10] httpSession/skipToEof: BEGIN [ 10] httpSession/skipToEof: continue [ 10] regurgitate body: BEGIN [ 10] regurgitate body: continue [ 10] regurgitate body: got chunk: ["\"a=b\""] [ 10] httpSession/skipToEof: got chunk: ["\"a=b\""] [ 10] httpSession/skipToEof: continue [ 10] regurgitate body: continue [ 10] regurgitate body: got EOF [ 10] httpSession/skipToEof: got EOF [ 10] Server.httpSession: request body skipped, sending response [ 10] sendResponse: whenEnum: enumerating bytes [ 10] countBytes writeEnd: BEGIN [ 10] writeEnd: BEGIN [ 10] writeEnd: continue [ 10] countBytes writeEnd: continue [ 10] countBytes writeEnd: got chunk: ["\"HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=utf-8\\r\\nDate: Wed, 16 Mar 2011 02:30:49 GMT\\r\\nServer: Snap/0.4.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n00F5\\r\\n<html>\\n <head>\\n <title>Echo Page</title>\\n </head>\\n <body>\\n <div id='content'>\\n <h1>Is there an echo in here?</h1>\\n </div>\\n <p>You wanted me to say this?</p>\\n <p>\\\"hi\\\"</p>\\n <p><a href='/'>Return</a></p>\\n </body>\\n</html>\\n\\r\\n0\\r\\n\\r\\n\""] [ 10] writeEnd: got chunk: ["\"HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=utf-8\\r\\nDate: Wed, 16 Mar 2011 02:30:49 GMT\\r\\nServer: Snap/0.4.1\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n00F5\\r\\n<html>\\n <head>\\n <title>Echo Page</title>\\n </head>\\n <body>\\n <div id='content'>\\n <h1>Is there an echo in here?</h1>\\n </div>\\n <p>You wanted me to say this?</p>\\n <p>\\\"hi\\\"</p>\\n <p><a href='/'>Return</a></p>\\n </body>\\n</html>\\n\\r\\n0\\r\\n\\r\\n\""] [ 10] SimpleBackend.writeOut(8): got chunk with 401 bytes [ 10] SimpleBackend.writeOut(8): wrote 401 bytes, last 10="l>\n\r\n0\r\n\r\n" [ 10] writeEnd: continue [ 10] countBytes writeEnd: continue [ 10] countBytes writeEnd: got EOF [ 10] writeEnd: got EOF [ 10] sendResponse: whenEnum: 401 bytes enumerated [ 10] sendResponse: response sent [ 10] Server.httpSession: sent 258 bytes [ 10] Server.httpSession: entered [ 10] receiveRequest: entered [ 10] parseRequest: BEGIN [ 10] parseRequest: continue [ 10] parseRequest: got chunk: ["\"\""] [ 10] parseRequest: continue [ 10] httpSession iteratee: continue [ 10] SimpleBackend.enumerate(8): got continue [ 10] SimpleBackend.enumerate(8): reading from socket [ 10] SimpleBackend.enumerate(8): got EOF from socket [ 10] SimpleBackend.enumerate(8): sending EOF to continuation [ 10] httpSession iteratee: got EOF [ 10] parseRequest: got EOF [ 10] receiveRequest: parseRequest returned [ 10] Server.httpSession: receiveRequest finished [ 10] Backend.tickleTimeout [ 10] Server.httpSession: parser did not produce a request, ending session [ 10] runHTTP/go: finished [ 10] thread killed, closing socket [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table [ 9] timeoutThread: woke up, killing old connections [ 9] timeoutThread: waiting for activity on thread table _______________________________________________ Snap mailing list [email protected] http://mailman-mail5.webfaction.com/listinfo/snap
