equal
deleted
inserted
replaced
|
1 Test raw style of hgweb |
|
2 |
|
3 $ hg init test |
|
4 $ cd test |
|
5 $ mkdir sub |
|
6 $ cat >'sub/some "text".txt' <<ENDSOME |
|
7 > This is just some random text |
|
8 > that will go inside the file and take a few lines. |
|
9 > It is very boring to read, but computers don't |
|
10 > care about things like that. |
|
11 > ENDSOME |
|
12 $ hg add 'sub/some "text".txt' |
|
13 $ hg commit -d "1 0" -m "Just some text" |
|
14 |
|
15 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid |
|
16 |
|
17 $ cat hg.pid >> $DAEMON_PIDS |
|
18 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw' content-type content-length content-disposition) >getoutput.txt & |
|
19 $ sleep 5 |
|
20 $ kill `cat hg.pid` |
|
21 $ sleep 1 # wait for server to scream and die |
|
22 $ cat getoutput.txt |
|
23 200 Script output follows |
|
24 content-type: text/plain; charset="ascii" |
|
25 content-length: 157 |
|
26 content-disposition: inline; filename="some \"text\".txt" |
|
27 |
|
28 This is just some random text |
|
29 that will go inside the file and take a few lines. |
|
30 It is very boring to read, but computers don't |
|
31 care about things like that. |
|
32 $ cat access.log error.log |
|
33 127.0.0.1 - - [*] "GET /?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw HTTP/1.1" 200 - (glob) |
|
34 |