If you then surf to http://localhost/foo/bar, you should see this request arrive:nc -l 80
You can respond with:GET /foo/bar HTTP/1.1
Host: localhost
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: FOO=BAR
The ASCII headers continue until a blank line, where it switches over to the content. So this should show up an OK! in the browser.HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 3
OK!
Or you can change the title of this page like this:alert("Hi!");
Here "x" is a variable storing a handle to the DOM node object representing the headline.var x=document.getElementsByTagName("h1")[0];
x.innerHTML="wuz here";
document.cookie="FOO=Barzo;";