1. open a webserver and browse

python3 -m http.server 8080

  1. open a listening socket on port 9000

ncat -l 9000

  1. upon browser call at localhost:9000 - see the HTTP GET request come in and answer it as follows :

HTTP/1.1 307 Temporary Redirect Location: https://www.eff.org/

HTTP/1.1 200 OK Content-length: 10 Content-type: text/plain

1234567890

  1. see 1234567890 print in the browser