comparison tests/test-lfs-serve-access.t @ 40035:393e44324037

httppeer: report http statistics Now that keepalive.py records HTTP request count and the number of bytes sent and received as part of performing those requests, we can easily print a report on the activity when closing a peer instance! Exact byte counts are globbed in tests because they are influenced by non-deterministic things, such as hostnames and port numbers. Plus, the exact byte count isn't too important anyway. I feel obliged to note that printing the byte count could have security implications. e.g. if sending a password via HTTP basic auth, the length of that password will influence the byte count and the reporting of the byte count could be a side-channel leak of the password length. I /think/ this is beyond our threshold for concern. But if we think it poses a problem, we can teach the byte count logging code to e.g. ignore sensitive HTTP request headers. We could also consider not reporting the byte count of request headers altogether. But since the wire protocol uses HTTP headers for sending command arguments, it is kind of important to report their size. Differential Revision: https://phab.mercurial-scm.org/D4858
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 01 Oct 2018 13:17:38 -0700
parents 5abc47d4ca6b
children 6637b079ae45
comparison
equal deleted inserted replaced
40034:5e5b06087ec5 40035:393e44324037
138 lfs: downloaded 1 files (20 bytes) 138 lfs: downloaded 1 files (20 bytes)
139 lfs.bin: remote created -> g 139 lfs.bin: remote created -> g
140 getting lfs.bin 140 getting lfs.bin
141 lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store 141 lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store
142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
143 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
143 144
144 $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS 145 $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
145 146
146 $ cat $TESTTMP/access.log $TESTTMP/errors.log 147 $ cat $TESTTMP/access.log $TESTTMP/errors.log
147 $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) 148 $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob)