Mercurial > hg-stable
annotate tests/test-http-protocol.t @ 37048:a708e1e4d7a8
url: support suppressing Accept header
Sending this header automatically could interfere with future
testing and client behavior. Let's add a knob to disable the
behavior.
We don't have a control for User-Agent because urllib will send
it if we don't set something. I don't feel like hacking into the
bowels of urllib to figure out how to suppress that. UA shouldn't
be used for anything meaningful. So it shouldn't pose any problems
beyond non-determinism (since the header has the Mercurial version in
it).
Differential Revision: https://phab.mercurial-scm.org/D2843
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 13 Mar 2018 10:34:36 -0700 |
parents | d3a9036d9ae9 |
children | cd0ca979a8b8 |
rev | line source |
---|---|
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 $ cat >> $HGRCPATH << EOF |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 > [web] |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 > push_ssl = false |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 > allow_push = * |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 > EOF |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 $ hg init server |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 $ cd server |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 $ touch a |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 $ hg -q commit -A -m initial |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 $ cd .. |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31028
diff
changeset
|
13 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 $ cat hg.pid >> $DAEMON_PIDS |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 compression formats are advertised in compression capability |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 #if zstd |
31028 | 19 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 #else |
31028 | 21 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 #endif |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 $ killdaemons.py |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 server.compressionengines can replace engines list wholesale |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31028
diff
changeset
|
28 $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 $ cat hg.pid > $DAEMON_PIDS |
31028 | 30 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 $ killdaemons.py |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 Order of engines can also change |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31028
diff
changeset
|
36 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 $ cat hg.pid > $DAEMON_PIDS |
31028 | 38 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null |
30762
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 |
35b516f800e0
wireproto: advertise supported media types and compression formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 $ killdaemons.py |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
41 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
42 Start a default server again |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
43 |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31028
diff
changeset
|
44 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
45 $ cat hg.pid > $DAEMON_PIDS |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
46 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
47 Server should send application/mercurial-0.1 to clients if no Accept is used |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
48 |
31028 | 49 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
50 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
51 content-type: application/mercurial-0.1 |
37011
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
52 date: $HTTP_DATE$ |
37012
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37011
diff
changeset
|
53 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
54 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
55 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
56 Server should send application/mercurial-0.1 when client says it wants it |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
57 |
31028 | 58 $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
59 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
60 content-type: application/mercurial-0.1 |
37011
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
61 date: $HTTP_DATE$ |
37012
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37011
diff
changeset
|
62 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
63 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
64 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
65 Server should send application/mercurial-0.2 when client says it wants it |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
66 |
31028 | 67 $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
68 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
69 content-type: application/mercurial-0.2 |
37011
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
70 date: $HTTP_DATE$ |
37012
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37011
diff
changeset
|
71 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
72 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
73 |
31028 | 74 $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
75 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
76 content-type: application/mercurial-0.2 |
37011
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
77 date: $HTTP_DATE$ |
37012
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37011
diff
changeset
|
78 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
79 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
80 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
81 Requesting a compression format that server doesn't support results will fall back to 0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
82 |
31028 | 83 $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
84 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
85 content-type: application/mercurial-0.1 |
37011
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
86 date: $HTTP_DATE$ |
37012
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37011
diff
changeset
|
87 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
88 transfer-encoding: chunked |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
89 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
90 #if zstd |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
91 zstd is used if available |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
92 |
31028 | 93 $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
94 $ f --size --hexdump --bytes 36 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
95 resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
96 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
97 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
98 0020: 28 b5 2f fd |(./.| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
99 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
100 #endif |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
101 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
102 application/mercurial-0.2 is not yet used on non-streaming responses |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
103 |
31028 | 104 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' - |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
105 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
106 content-length: 41 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
107 content-type: application/mercurial-0.1 |
37011
16203c6079e7
tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34483
diff
changeset
|
108 date: $HTTP_DATE$ |
37012
5890e5872f36
hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37011
diff
changeset
|
109 server: testing stub value |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
110 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
111 e93700bd72895c5addab234c56d4024b487a362f |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
112 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
113 Now test protocol preference usage |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
114 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
115 $ killdaemons.py |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
31028
diff
changeset
|
116 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
117 $ cat hg.pid > $DAEMON_PIDS |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
118 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
119 No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
120 |
31028 | 121 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
122 200 Script output follows |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
123 content-type: application/mercurial-0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
124 |
31028 | 125 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
126 $ f --size --hexdump --bytes 28 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
127 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
128 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
129 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
130 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
131 Explicit 0.1 will send zlib because "none" isn't supported on 0.1 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
132 |
31028 | 133 $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
134 $ f --size --hexdump --bytes 28 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
135 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
136 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
137 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
138 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
139 0.2 with no compression will get "none" because that is server's preference |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
140 (spec says ZL and UN are implicitly supported) |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
141 |
31028 | 142 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
143 $ f --size --hexdump --bytes 32 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
144 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
145 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
146 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
147 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
148 Client receives server preference even if local order doesn't match |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
149 |
31028 | 150 $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
151 $ f --size --hexdump --bytes 32 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
152 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
153 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
154 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
155 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
156 Client receives only supported format even if not server preferred format |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
157 |
31028 | 158 $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
30764
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
159 $ f --size --hexdump --bytes 33 --sha1 resp |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
160 resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36 |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
161 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
162 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib| |
e75463e3179f
protocol: send application/mercurial-0.2 responses to capable clients
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30762
diff
changeset
|
163 0020: 78 |x| |
37015
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
164 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
165 $ killdaemons.py |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
166 $ cd .. |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
167 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
168 Test listkeys for listing namespaces |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
169 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
170 $ hg init empty |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
171 $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
172 $ cat hg.pid > $DAEMON_PIDS |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
173 |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
174 $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
175 > command listkeys |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
176 > namespace namespaces |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
177 > EOF |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
178 s> GET /?cmd=capabilities HTTP/1.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
179 s> Accept-Encoding: identity\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
180 s> accept: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
181 s> host: $LOCALIP:$HGPORT\r\n (glob) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
182 s> user-agent: mercurial/proto-1.0 (Mercurial *)\r\n (glob) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
183 s> \r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
184 s> makefile('rb', None) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
185 s> HTTP/1.1 200 Script output follows\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
186 s> Server: testing stub value\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
187 s> Date: $HTTP_DATE$\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
188 s> Content-Type: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
189 s> Content-Length: *\r\n (glob) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
190 s> \r\n |
37047
d3a9036d9ae9
util: don't log low-level I/O calls for HTTP peer
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37025
diff
changeset
|
191 s> lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=$BUNDLE2_COMPRESSIONS$ |
37015
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
192 sending listkeys command |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
193 s> GET /?cmd=listkeys HTTP/1.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
194 s> Accept-Encoding: identity\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
195 s> vary: X-HgArg-1,X-HgProto-1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
196 s> x-hgarg-1: namespace=namespaces\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
197 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
198 s> accept: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
199 s> host: $LOCALIP:$HGPORT\r\n (glob) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
200 s> user-agent: mercurial/proto-1.0 (Mercurial *)\r\n (glob) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
201 s> \r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
202 s> makefile('rb', None) |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
203 s> HTTP/1.1 200 Script output follows\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
204 s> Server: testing stub value\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
205 s> Date: $HTTP_DATE$\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
206 s> Content-Type: application/mercurial-0.1\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
207 s> Content-Length: 30\r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
208 s> \r\n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
209 s> bookmarks \n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
210 s> namespaces \n |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
211 s> phases |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
212 response: bookmarks \nnamespaces \nphases |
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
213 |
37016
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
214 Same thing, but with "httprequest" command |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
215 |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
216 $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
217 > httprequest GET ?cmd=listkeys |
37048
a708e1e4d7a8
url: support suppressing Accept header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37047
diff
changeset
|
218 > user-agent: test |
37016
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
219 > x-hgarg-1: namespace=namespaces |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
220 > EOF |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
221 using raw connection to peer |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
222 s> GET /?cmd=listkeys HTTP/1.1\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
223 s> Accept-Encoding: identity\r\n |
37048
a708e1e4d7a8
url: support suppressing Accept header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37047
diff
changeset
|
224 s> user-agent: test\r\n |
37016
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
225 s> x-hgarg-1: namespace=namespaces\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
226 s> host: $LOCALIP:$HGPORT\r\n (glob) |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
227 s> \r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
228 s> makefile('rb', None) |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
229 s> HTTP/1.1 200 Script output follows\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
230 s> Server: testing stub value\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
231 s> Date: $HTTP_DATE$\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
232 s> Content-Type: application/mercurial-0.1\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
233 s> Content-Length: 30\r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
234 s> \r\n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
235 s> bookmarks \n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
236 s> namespaces \n |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
237 s> phases |
b6a7070e7663
debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37015
diff
changeset
|
238 |
37015
fc8939825632
debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37012
diff
changeset
|
239 $ killdaemons.py |