Beispiel #1
0
def test_normal_request_frame():

    request = HTT.parse(
        "GET / HTTP/1.1\r\n"
        "Date: Fri, 08 Jul 2011 00:59:41 GMT\r\n"
        "Server: Apache/2.2.4 (Unix) PHP/5.2.0\r\n"
        "Content-Type: text/html\r\n"
        "\r\n"
    )
Beispiel #2
0
def test_normal_response_frame():
    response = HTT.parse(
        "HTTP/1.1 200 OK\r\n"
        "Date: Fri, 08 Jul 2011 00:59:41 GMT\r\n"
        "Server: Apache/2.2.4 (Unix) PHP/5.2.0\r\n"
        "Content-Type: text/html\r\n"
        "Content-Length: 37\r\n"
        "\r\n"
        "<html>"
        "<body>"
        "Hello World"
        "</body>"
        "</html>"
    )