tests/test-http-protocol.t
changeset 30762 35b516f800e0
child 30764 e75463e3179f
equal deleted inserted replaced
30761:7283719e2bfd 30762:35b516f800e0
       
     1   $ cat >> $HGRCPATH << EOF
       
     2   > [web]
       
     3   > push_ssl = false
       
     4   > allow_push = *
       
     5   > EOF
       
     6 
       
     7   $ hg init server
       
     8   $ cd server
       
     9   $ touch a
       
    10   $ hg -q commit -A -m initial
       
    11   $ cd ..
       
    12 
       
    13   $ hg -R server serve -p $HGPORT -d --pid-file hg.pid
       
    14   $ cat hg.pid >> $DAEMON_PIDS
       
    15 
       
    16 compression formats are advertised in compression capability
       
    17 
       
    18 #if zstd
       
    19   $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep compression
       
    20   compression=zstd,zlib
       
    21 #else
       
    22   $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep compression
       
    23   compression=ZL
       
    24 #endif
       
    25 
       
    26   $ killdaemons.py
       
    27 
       
    28 server.compressionengines can replace engines list wholesale
       
    29 
       
    30   $ hg --config server.compressionengines=none -R server serve -p $HGPORT -d --pid-file hg.pid
       
    31   $ cat hg.pid > $DAEMON_PIDS
       
    32   $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep compression
       
    33   compression=none
       
    34 
       
    35   $ killdaemons.py
       
    36 
       
    37 Order of engines can also change
       
    38 
       
    39   $ hg --config server.compressionengines=none,zlib -R server serve -p $HGPORT -d --pid-file hg.pid
       
    40   $ cat hg.pid > $DAEMON_PIDS
       
    41   $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep compression
       
    42   compression=none,zlib
       
    43 
       
    44   $ killdaemons.py