public void Http11_Test() { UtilClient cl = new UtilClient(hostName, port); cl.Send("GET / HTTP/1.1\n\n"); var s = cl.Recv(); Assert.AreEqual(s, "HTTP/1.1 400 Missing Host header or incompatible headers detected.\r\n"); cl.Dispose(); }
public void Http10_Test() { UtilClient cl = new UtilClient(hostName, port); cl.Send("GET / HTTP/1.0\n\n"); var s = cl.Recv(); Assert.AreEqual(s, "HTTP/1.0 200 Document follows\r\n"); cl.Dispose(); }