rust-kernel
Rustbelt: a hobby x86_64 kernel written in Rust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/sh
# A one-shot HTTP/1.0 server on stdin/stdout, for QEMU's guestfwd:
# -netdev user,...,guestfwd=tcp:10.0.2.100:80-cmd:sh scripts/http-reply.sh
# QEMU runs this once per connection the guest makes to 10.0.2.100:80, with
# the connection as stdin/stdout. No host port is opened, so tests can't
# collide with anything else on the machine.
# GET / -> a short greeting
# GET /big -> `seq 1 20000` (108894 bytes: exercises TCP flow control)
# other -> 404
cr=
while ; do # skip the request headers
[ || [ && break
done
case "" in
/) ;;
/big)
;;
*) ;;
esac
|