tests/test-hgweb-raw.t
branchstable
changeset 16298 0eefd118f27e
parent 15446 c5c9ca3719f9
child 16496 abbabbbe4ec2
equal deleted inserted replaced
16297:1791d7662d32 16298:0eefd118f27e
    16   $ hg commit -d "1 0" -m "Just some text"
    16   $ hg commit -d "1 0" -m "Just some text"
    17 
    17 
    18   $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid
    18   $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid
    19 
    19 
    20   $ cat hg.pid >> $DAEMON_PIDS
    20   $ cat hg.pid >> $DAEMON_PIDS
    21   $ ("$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 &
    21   $ ("$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
    22   $ sleep 5
    22 
    23   $ kill `cat hg.pid`
    23   $ while kill `cat hg.pid` 2>/dev/null; do true; done
    24   $ sleep 1 # wait for server to scream and die
    24 
    25   $ cat getoutput.txt
    25   $ cat getoutput.txt
    26   200 Script output follows
    26   200 Script output follows
    27   content-type: application/binary
    27   content-type: application/binary
    28   content-length: 157
    28   content-length: 157
    29   content-disposition: inline; filename="some \"text\".txt"
    29   content-disposition: inline; filename="some \"text\".txt"
    38   $ rm access.log error.log
    38   $ rm access.log error.log
    39   $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \
    39   $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \
    40   > --config web.guessmime=True
    40   > --config web.guessmime=True
    41 
    41 
    42   $ cat hg.pid >> $DAEMON_PIDS
    42   $ cat hg.pid >> $DAEMON_PIDS
    43   $ ("$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 &
    43   $ ("$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
    44   $ sleep 5
    44   $ while kill `cat hg.pid` 2>/dev/null; do true; done
    45   $ kill `cat hg.pid`
    45 
    46   $ sleep 1 # wait for server to scream and die
       
    47   $ cat getoutput.txt
    46   $ cat getoutput.txt
    48   200 Script output follows
    47   200 Script output follows
    49   content-type: text/plain; charset="ascii"
    48   content-type: text/plain; charset="ascii"
    50   content-length: 157
    49   content-length: 157
    51   content-disposition: inline; filename="some \"text\".txt"
    50   content-disposition: inline; filename="some \"text\".txt"