/[jscoverage]/trunk/tests/server-bad-requests.sh
ViewVC logotype

Diff of /trunk/tests/server-bad-requests.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 260 by siliconforks, Sun Oct 5 18:08:00 2008 UTC revision 261 by siliconforks, Mon Oct 6 00:04:13 2008 UTC
# Line 46  Line 46 
46    
47  sleep $delay  sleep $delay
48    
49    if which netcat
50    then
51      NETCAT=netcat
52    elif which nc
53    then
54      NETCAT=nc
55    else
56      # skip test
57      exit 77
58    fi
59    
60  bad_request() {  bad_request() {
61    /bin/echo -ne "$1" | /bin/netcat 127.0.0.1 $server_port > OUT 2> ERR    /bin/echo -ne "$1" | $NETCAT 127.0.0.1 $server_port > OUT 2> ERR
62    echo 'HTTP/1.1 400 Bad Request' > EXPECTED    echo 'HTTP/1.1 400 Bad Request' > EXPECTED
63    head -n 1 OUT > ACTUAL    head -n 1 OUT > ACTUAL
64    diff --strip-trailing-cr EXPECTED ACTUAL    diff --strip-trailing-cr EXPECTED ACTUAL

Legend:
Removed from v.260  
changed lines
  Added in v.261

  ViewVC Help
Powered by ViewVC 1.1.24