The write function was logging before calling the function while the sendall
function were logging after calling the function.
We align the write behavior on the sendall behavior before unifying the
code.
( )
Alphare |
hg-reviewers |
The write function was logging before calling the function while the sendall
function were logging after calling the function.
We align the write behavior on the sendall behavior before unifying the
code.
No Linters Available |
No Unit Test Coverage |
✅ refresh by Heptapod after a successful CI run (🐙 💚)
Path | Packages | |||
---|---|---|---|---|
M | tests/test-http-bad-server.t (56 lines) | |||
M | tests/testlib/badserverext.py (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
7af1915ce1dc | 7018897c8f92 | Pierre-Yves David | Jan 23 2022, 3:25 PM |
readline(* from *) -> (2) \r\n (glob) | readline(* from *) -> (2) \r\n (glob) | ||||
read(* from 28) -> (*) cmds=* (glob) | read(* from 28) -> (*) cmds=* (glob) | ||||
read limit reached; closing socket | read limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after receiving N bytes | Exception: connection closed after receiving N bytes | ||||
write(126) -> HTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | write(126) -> HTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | ||||
write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !) | |||||
$ rm -f error.log | $ rm -f error.log | ||||
Now move on to partial server responses | Now move on to partial server responses | ||||
======================================= | ======================================= | ||||
Server sends a single character from the HTTP response line | Server sends a single character from the HTTP response line | ||||
----------------------------------------------------------- | ----------------------------------------------------------- | ||||
write(1 from 160) -> (0) H (py3 no-py36 !) | write(1 from 160) -> (0) H (py3 no-py36 !) | ||||
write(1 from 36) -> (0) H (no-py3 !) | write(1 from 36) -> (0) H (no-py3 !) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(286) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | write(286) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | ||||
write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !) | |||||
$ rm -f error.log | $ rm -f error.log | ||||
Server sends an incomplete capabilities response body | Server sends an incomplete capabilities response body | ||||
----------------------------------------------------- | ----------------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
$ cat hg.pid > $DAEMON_PIDS | $ cat hg.pid > $DAEMON_PIDS | ||||
write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n (no-py3 !) | write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n (no-py3 !) | ||||
write(22 from 41) -> (0) Content-Type: applicat (no-py3 !) | write(22 from 41) -> (0) Content-Type: applicat (no-py3 !) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(285) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | write(285) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | ||||
write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !) | |||||
$ rm -f error.log | $ rm -f error.log | ||||
Server sends an incomplete HTTP response body to batch request | Server sends an incomplete HTTP response body to batch request | ||||
-------------------------------------------------------------- | -------------------------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=774 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=774 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
$ cat hg.pid > $DAEMON_PIDS | $ cat hg.pid > $DAEMON_PIDS | ||||
write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n (no-py3 !) | write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n (no-py3 !) | ||||
write(33 from 41) -> (0) Content-Type: application/mercuri (no-py3 !) | write(33 from 41) -> (0) Content-Type: application/mercuri (no-py3 !) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | ||||
write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !) | |||||
$ rm -f error.log | $ rm -f error.log | ||||
Server stops before it sends transfer encoding | Server stops before it sends transfer encoding | ||||
---------------------------------------------- | ---------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=954 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=954 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
$ cat hg.pid > $DAEMON_PIDS | $ cat hg.pid > $DAEMON_PIDS | ||||
$ hg clone http://localhost:$HGPORT/ clone | $ hg clone http://localhost:$HGPORT/ clone | ||||
requesting all changes | requesting all changes | ||||
abort: stream ended unexpectedly (got 0 bytes, expected 1) | abort: stream ended unexpectedly (got 0 bytes, expected 1) | ||||
[255] | [255] | ||||
$ killdaemons.py $DAEMON_PIDS | $ killdaemons.py $DAEMON_PIDS | ||||
#if py36 | #if py36 | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -3 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -3 | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -4 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -4 | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | |||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !) | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server sends empty HTTP body for getbundle | Server sends empty HTTP body for getbundle | ||||
------------------------------------------ | ------------------------------------------ | ||||
$ hg serve --config badserver.close-after-send-bytes=959 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=959 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n (no-py3 !) | write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n (no-py3 !) | ||||
write(2 from 2) -> (0) \r\n (no-py3 !) | write(2 from 2) -> (0) \r\n (no-py3 !) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) | ||||
write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !) | |||||
$ rm -f error.log | $ rm -f error.log | ||||
Server sends partial compression string | Server sends partial compression string | ||||
--------------------------------------- | --------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=983 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=983 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
$ cat hg.pid > $DAEMON_PIDS | $ cat hg.pid > $DAEMON_PIDS | ||||
write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc) (no-py3 !) | write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc) (no-py3 !) | ||||
write(9 from 9) -> (9) 4\r\nnone\r\n (no-py3 !) | write(9 from 9) -> (9) 4\r\nnone\r\n (no-py3 !) | ||||
write(9 from 9) -> (0) 4\r\nHG20\r\n (no-py3 !) | write(9 from 9) -> (0) 4\r\nHG20\r\n (no-py3 !) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n (no-py3 !) | |||||
$ rm -f error.log | $ rm -f error.log | ||||
Server sends partial bundle2 header magic | Server sends partial bundle2 header magic | ||||
----------------------------------------- | ----------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=980 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=980 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
$ cat hg.pid > $DAEMON_PIDS | $ cat hg.pid > $DAEMON_PIDS | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -11 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -11 | ||||
readline(65537) -> (2) \r\n (py3 !) | readline(65537) -> (2) \r\n (py3 !) | ||||
write(167 from 167) -> (21) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(167 from 167) -> (21) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n (no-py3 !) | write(41 from 41) -> (51) Content-Type: application/mercurial-0.2\r\n | ||||
write(2 from 2) -> (21) \r\n (no-py3 !) | write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n | ||||
write(2 from 2) -> (21) \r\n | |||||
write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (6) 4\r\nnone\r\n | write(9 from 9) -> (6) 4\r\nnone\r\n | ||||
write(6 from 9) -> (0) 4\r\nHG2 | write(6 from 9) -> (0) 4\r\nHG2 | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server sends incomplete bundle2 stream params length | Server sends incomplete bundle2 stream params length | ||||
---------------------------------------------------- | ---------------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=989 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=989 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12 | ||||
readline(65537) -> (2) \r\n (py3 !) | readline(65537) -> (2) \r\n (py3 !) | ||||
write(167 from 167) -> (30) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(167 from 167) -> (30) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n (no-py3 !) | write(41 from 41) -> (60) Content-Type: application/mercurial-0.2\r\n | ||||
write(2 from 2) -> (30) \r\n (no-py3 !) | write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n | ||||
write(2 from 2) -> (30) \r\n | |||||
write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (15) 4\r\nnone\r\n | write(9 from 9) -> (15) 4\r\nnone\r\n | ||||
write(9 from 9) -> (6) 4\r\nHG20\r\n | write(9 from 9) -> (6) 4\r\nHG20\r\n | ||||
write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc) | write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Servers stops after bundle2 stream params header | Servers stops after bundle2 stream params header | ||||
------------------------------------------------ | ------------------------------------------------ | ||||
$ hg serve --config badserver.close-after-send-bytes=992 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=992 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12 | ||||
readline(65537) -> (2) \r\n (py3 !) | readline(65537) -> (2) \r\n (py3 !) | ||||
write(167 from 167) -> (33) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(167 from 167) -> (33) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n (no-py3 !) | write(41 from 41) -> (63) Content-Type: application/mercurial-0.2\r\n | ||||
write(2 from 2) -> (33) \r\n (no-py3 !) | write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n | ||||
write(2 from 2) -> (33) \r\n | |||||
write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (18) 4\r\nnone\r\n | write(9 from 9) -> (18) 4\r\nnone\r\n | ||||
write(9 from 9) -> (9) 4\r\nHG20\r\n | write(9 from 9) -> (9) 4\r\nHG20\r\n | ||||
write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server stops sending after bundle2 part header length | Server stops sending after bundle2 part header length | ||||
----------------------------------------------------- | ----------------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=1001 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=1001 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -13 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -13 | ||||
readline(65537) -> (2) \r\n (py3 !) | readline(65537) -> (2) \r\n (py3 !) | ||||
write(167 from 167) -> (42) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(167 from 167) -> (42) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n (no-py3 !) | write(41 from 41) -> (72) Content-Type: application/mercurial-0.2\r\n | ||||
write(2 from 2) -> (42) \r\n (no-py3 !) | write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n | ||||
write(2 from 2) -> (42) \r\n | |||||
write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (27) 4\r\nnone\r\n | write(9 from 9) -> (27) 4\r\nnone\r\n | ||||
write(9 from 9) -> (18) 4\r\nHG20\r\n | write(9 from 9) -> (18) 4\r\nHG20\r\n | ||||
write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server stops sending after bundle2 part header | Server stops sending after bundle2 part header | ||||
---------------------------------------------- | ---------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=1048 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=1048 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14 | ||||
readline(65537) -> (2) \r\n (py3 !) | readline(65537) -> (2) \r\n (py3 !) | ||||
write(167 from 167) -> (89) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(167 from 167) -> (89) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n (no-py3 !) | write(41 from 41) -> (119) Content-Type: application/mercurial-0.2\r\n | ||||
write(2 from 2) -> (89) \r\n (no-py3 !) | write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n | ||||
write(2 from 2) -> (89) \r\n | |||||
write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (74) 4\r\nnone\r\n | write(9 from 9) -> (74) 4\r\nnone\r\n | ||||
write(9 from 9) -> (65) 4\r\nHG20\r\n | write(9 from 9) -> (65) 4\r\nHG20\r\n | ||||
write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | ||||
write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server stops after bundle2 part payload chunk size | Server stops after bundle2 part payload chunk size | ||||
-------------------------------------------------- | -------------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=1069 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=1069 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -15 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -15 | ||||
write(167 from 167) -> (110) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(167 from 167) -> (110) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(2 from 2) -> (110) \r\n (no-py3 !) | write(28 from 28) -> (112) Transfer-Encoding: chunked\r\n | ||||
write(2 from 2) -> (110) \r\n | |||||
write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (95) 4\r\nnone\r\n | write(9 from 9) -> (95) 4\r\nnone\r\n | ||||
write(9 from 9) -> (86) 4\r\nHG20\r\n | write(9 from 9) -> (86) 4\r\nHG20\r\n | ||||
write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | ||||
write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | ||||
write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | ||||
write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc) | write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server stops sending in middle of bundle2 payload chunk | Server stops sending in middle of bundle2 payload chunk | ||||
------------------------------------------------------- | ------------------------------------------------------- | ||||
$ hg serve --config badserver.close-after-send-bytes=1530 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=1530 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -16 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -16 | ||||
readline(65537) -> (2) \r\n (py3 !) | readline(65537) -> (2) \r\n (py3 !) | ||||
write(167 from 167) -> (571) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | write(167 from 167) -> (571) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) | ||||
write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n (no-py3 !) | write(41 from 41) -> (601) Content-Type: application/mercurial-0.2\r\n | ||||
write(2 from 2) -> (571) \r\n (no-py3 !) | write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n | ||||
write(2 from 2) -> (571) \r\n | |||||
write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (556) 4\r\nnone\r\n | write(9 from 9) -> (556) 4\r\nnone\r\n | ||||
write(9 from 9) -> (547) 4\r\nHG20\r\n | write(9 from 9) -> (547) 4\r\nHG20\r\n | ||||
write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | ||||
write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | ||||
write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | ||||
write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server stops sending after 0 length payload chunk size | Server stops sending after 0 length payload chunk size | ||||
------------------------------------------------------ | ------------------------------------------------------ | ||||
$ hg serve --config badserver.close-after-send-bytes=1561 -p $HGPORT -d --pid-file=hg.pid -E error.log | $ hg serve --config badserver.close-after-send-bytes=1561 -p $HGPORT -d --pid-file=hg.pid -E error.log | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -17 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -17 | ||||
write(2 from 2) -> (602) \r\n | |||||
write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc) | write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc) | ||||
write(9 from 9) -> (587) 4\r\nnone\r\n | write(9 from 9) -> (587) 4\r\nnone\r\n | ||||
write(9 from 9) -> (578) 4\r\nHG20\r\n | write(9 from 9) -> (578) 4\r\nHG20\r\n | ||||
write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | ||||
write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | ||||
write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | ||||
write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc) | write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc) | ||||
write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc) | write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
Server stops sending after 0 part bundle part header (indicating end of bundle2 payload) | Server stops sending after 0 part bundle part header (indicating end of bundle2 payload) | ||||
---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ||||
This is before the 0 size chunked transfer part that signals end of HTTP response. | This is before the 0 size chunked transfer part that signals end of HTTP response. | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -21 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -21 | ||||
write(9 from 9) -> (753) 4\r\nHG20\r\n | |||||
write(9 from 9) -> (744) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (744) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (735) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | write(9 from 9) -> (735) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | ||||
write(47 from 47) -> (688) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | write(47 from 47) -> (688) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | ||||
write(9 from 9) -> (679) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | write(9 from 9) -> (679) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | ||||
write(473 from 473) -> (206) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | write(473 from 473) -> (206) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (197) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (197) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (188) 4\\r\\n\x00\x00\x00 \\r\\n (esc) | write(9 from 9) -> (188) 4\\r\\n\x00\x00\x00 \\r\\n (esc) | ||||
write(38 from 38) -> (150) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) | write(38 from 38) -> (150) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) | ||||
write(9 from 9) -> (141) 4\\r\\n\x00\x00\x00:\\r\\n (esc) | write(9 from 9) -> (141) 4\\r\\n\x00\x00\x00:\\r\\n (esc) | ||||
write(64 from 64) -> (77) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n | write(64 from 64) -> (77) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n | ||||
write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (59) 4\\r\\n\x00\x00\x00#\\r\\n (esc) | write(9 from 9) -> (59) 4\\r\\n\x00\x00\x00#\\r\\n (esc) | ||||
write(41 from 41) -> (18) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) | write(41 from 41) -> (18) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) | ||||
write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
$ rm -rf clone | $ rm -rf clone | ||||
Server sends a size 0 chunked-transfer size without terminating \r\n | Server sends a size 0 chunked-transfer size without terminating \r\n | ||||
-------------------------------------------------------------------- | -------------------------------------------------------------------- | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
#else | #else | ||||
$ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -22 | $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -22 | ||||
write(9 from 9) -> (756) 4\r\nHG20\r\n | |||||
write(9 from 9) -> (747) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (747) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (738) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | write(9 from 9) -> (738) 4\\r\\n\x00\x00\x00)\\r\\n (esc) | ||||
write(47 from 47) -> (691) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | write(47 from 47) -> (691) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) | ||||
write(9 from 9) -> (682) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | write(9 from 9) -> (682) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) | ||||
write(473 from 473) -> (209) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | write(473 from 473) -> (209) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (200) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (200) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (191) 4\\r\\n\x00\x00\x00 \\r\\n (esc) | write(9 from 9) -> (191) 4\\r\\n\x00\x00\x00 \\r\\n (esc) | ||||
write(38 from 38) -> (153) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) | write(38 from 38) -> (153) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) | ||||
write(9 from 9) -> (144) 4\\r\\n\x00\x00\x00:\\r\\n (esc) | write(9 from 9) -> (144) 4\\r\\n\x00\x00\x00:\\r\\n (esc) | ||||
write(64 from 64) -> (80) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n | write(64 from 64) -> (80) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n | ||||
write(9 from 9) -> (71) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (71) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (62) 4\\r\\n\x00\x00\x00#\\r\\n (esc) | write(9 from 9) -> (62) 4\\r\\n\x00\x00\x00#\\r\\n (esc) | ||||
write(41 from 41) -> (21) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) | write(41 from 41) -> (21) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) | ||||
write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) | ||||
write(3 from 5) -> (0) 0\r\n | write(3 from 5) -> (0) 0\r\n | ||||
write limit reached; closing socket | write limit reached; closing socket | ||||
$LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) | ||||
Traceback (most recent call last): | Traceback (most recent call last): | ||||
Exception: connection closed after sending N bytes | Exception: connection closed after sending N bytes | ||||
write(27) -> 15\r\nInternal Server Error\r\n | |||||
#endif | #endif | ||||
$ rm -f error.log | $ rm -f error.log | ||||
$ rm -rf clone | $ rm -rf clone |
return result | return result | ||||
def write(self, data): | def write(self, data): | ||||
remaining = object.__getattribute__(self, '_cond').remaining_send_bytes | remaining = object.__getattribute__(self, '_cond').remaining_send_bytes | ||||
# No byte limit on this operation. Call original function. | # No byte limit on this operation. Call original function. | ||||
if not remaining: | if not remaining: | ||||
self._writelog(b'write(%d) -> %s' % (len(data), data)) | |||||
result = object.__getattribute__(self, '_orig').write(data) | result = object.__getattribute__(self, '_orig').write(data) | ||||
self._writelog(b'write(%d) -> %s' % (len(data), data)) | |||||
return result | return result | ||||
if len(data) > remaining: | if len(data) > remaining: | ||||
newdata = data[0:remaining] | newdata = data[0:remaining] | ||||
else: | else: | ||||
newdata = data | newdata = data | ||||
remaining -= len(newdata) | remaining -= len(newdata) | ||||
result = object.__getattribute__(self, '_orig').write(newdata) | |||||
self._writelog( | self._writelog( | ||||
b'write(%d from %d) -> (%d) %s' | b'write(%d from %d) -> (%d) %s' | ||||
% (len(newdata), len(data), remaining, newdata) | % (len(newdata), len(data), remaining, newdata) | ||||
) | ) | ||||
result = object.__getattribute__(self, '_orig').write(newdata) | |||||
object.__getattribute__(self, '_cond').remaining_send_bytes = remaining | object.__getattribute__(self, '_cond').remaining_send_bytes = remaining | ||||
if remaining <= 0: | if remaining <= 0: | ||||
self._writelog(b'write limit reached; closing socket') | self._writelog(b'write limit reached; closing socket') | ||||
self._close() | self._close() | ||||
raise Exception('connection closed after sending N bytes') | raise Exception('connection closed after sending N bytes') | ||||