Tue, 13 Mar 2018 17:42:00 -0700 util: observable proxy objects for sockets
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 17:42:00 -0700] rev 37010
util: observable proxy objects for sockets We previously introduced proxy objects and observers for file objects to help implement low-level tests for the SSH wire protocol. In this commit, we do the same for sockets in order to help test the HTTP server. We only proxy/observe some socket methods. I didn't feel like implementing all the methods because there are so many of them and implementing them will provide no short term value. We can always implement them later. # no-check-commit because we implement foo_bar methods on stdlib types Differential Revision: https://phab.mercurial-scm.org/D2721
Tue, 13 Mar 2018 09:45:56 -0700 hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 09:45:56 -0700] rev 37009
hgweb: allow defining Server response header for HTTP server By default, the string contains the Python version. Server operators may want to change this. Because we like deterministic tests, we change the test harness to always set this value to a known string. Various globs over the server header have now been removed. # no-check-commit because we add version_string() Differential Revision: https://phab.mercurial-scm.org/D2840
Tue, 13 Mar 2018 08:58:52 -0700 tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 08:58:52 -0700] rev 37008
tests: use $HTTP_DATE$ for Date header Support for the $HTTP_DATE$ substitution was recently added. Let's adopt it more widely. We had to tweak the substitution to be case insensitive, since HTTP headers are case insensitive. I also found a minor test issue not globbing over the length of the Server response header. Differential Revision: https://phab.mercurial-scm.org/D2839
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip