pathod

pathod is a pathological HTTP/S daemon, useful for testing and torturing HTTP clients.

(…)

The simplest way to use pathod is to fire up the daemon, and specify the response behaviour you want using this language in the request URL.