Skip to content

Instantly share code, notes, and snippets.

@ruevaughn
Forked from ArtemGr/example.sh
Created October 15, 2022 04:35
Show Gist options
  • Save ruevaughn/433909c10a117c48ee118ce913c8fa7e to your computer and use it in GitHub Desktop.
Save ruevaughn/433909c10a117c48ee118ce913c8fa7e to your computer and use it in GitHub Desktop.
Testing HTTP pipelining from the command line.
# http://aaronhawley.livejournal.com/12621.html
(echo -en "GET / HTTP/1.1\nHost: fropl.com\n\nGET / HTTP/1.1\nHost: fropl.com\n\n"; sleep 0.1) | telnet localhost 80
# Also:
perl -e '$| = 1; print "GET / HTTP/1.1\nHost: fropl.com\n\nGET / HTTP/1.1\nHost: fropl.com\n\n"; sleep (1)' | telnet localhost 80
# Also (from https://github.com/ellzey/libevhtp/issues/86#issuecomment-19137572):
(echo -en "GET /1 HTTP/1.1\r\n\r\nGET /2 HTTP/1.1\r\n\r\n"; sleep 0.1) | nc localhost 8081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment