Show More
@@ -1,23 +1,34 b'' | |||||
1 | #!/bin/sh |
|
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 | |||
2 |
|
16 | |||
3 | hg init test |
|
17 | $ cat hg.pid >> $DAEMON_PIDS | |
4 | cd test |
|
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 & | |
5 | mkdir sub |
|
19 | $ sleep 5 | |
6 | cat >'sub/some "text".txt' <<ENDSOME |
|
20 | $ kill `cat hg.pid` | |
7 | This is just some random text |
|
21 | $ sleep 1 # wait for server to scream and die | |
8 | that will go inside the file and take a few lines. |
|
22 | $ cat getoutput.txt | |
9 | It is very boring to read, but computers don't |
|
23 | 200 Script output follows | |
10 | care about things like that. |
|
24 | content-type: text/plain; charset="ascii" | |
11 | ENDSOME |
|
25 | content-length: 157 | |
12 | hg add 'sub/some "text".txt' |
|
26 | content-disposition: inline; filename="some \"text\".txt" | |
13 | hg commit -d "1 0" -m "Just some text" |
|
27 | ||
14 | hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid |
|
28 | This is just some random text | |
15 | cat hg.pid >> $DAEMON_PIDS |
|
29 | that will go inside the file and take a few lines. | |
16 | ("$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 & |
|
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) | |||
17 |
|
34 | |||
18 | sleep 5 |
|
|||
19 | kill `cat hg.pid` |
|
|||
20 | sleep 1 # wait for server to scream and die |
|
|||
21 | cat getoutput.txt |
|
|||
22 | cat access.log error.log | \ |
|
|||
23 | sed 's/^[^ ]*\( [^[]*\[\)[^]]*\(\].*\)$/host\1date\2/' |
|
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now