offset=0; connector.reopen(); response=connector.getResponses("GET /R1 HTTP/1.0\n"+ "Host: localhost\n"+ "Connection: keep-alive\n"+ "Content-Length: 10\n"+ "\n"+ "1234567890\n"+  "GET /RA HTTP/1.0\n"+ "Host: localhost\n"+ "Connection: keep-alive\n"+ "Content-Length: 10\n"+ "\n"+ "ABCDEFGHIJ\n"+  "GET /R2 HTTP/1.0\n"+ "Host: localhost\n"+ "Connection: close\n"+ "\n"+  "GET /R3 HTTP/1.0\n"+ "Host: localhost\n"+ "Connection: close\n"+ "\n"); offset=checkContains(response,offset,"HTTP/1.1 200 OK\015\012","19.6.2 Keep-alive 1")+1; offset=checkContains(response,offset,"Connection: keep-alive","19.6.2 Keep-alive 1")+1; offset=checkContains(response,offset,"<html>","19.6.2 Keep-alive 1")+1; offset=checkContains(response,offset,"1234567890","19.6.2 Keep-alive 1")+1;  offset=checkContains(response,offset,"HTTP/1.1 200 OK\015\012","19.6.2 Keep-alive 1")+1; offset=checkContains(response,offset,"Connection: keep-alive","19.6.2 Keep-alive 1")+1; offset=checkContains(response,offset,"<html>","19.6.2 Keep-alive 1")+1; offset=checkContains(response,offset,"ABCDEFGHIJ","19.6.2 Keep-alive 1")+1;  offset=checkContains(response,offset,"HTTP/1.1 200 OK\015\012","19.6.2 Keep-alive 2")+11; offset=checkContains(response,offset,"Connection: close","19.6.2 Keep-alive close")+1; offset=checkContains(response,offset,"/R2","19.6.2 Keep-alive close")+3;  assertEquals("19.6.2 closed",-1,response.indexOf("/R3"));
    public void test19_6()    {                try        {                        String response;            int offset=0; connector.reopen();            offset=0; connector.reopen();            response=connector.getResponses("GET /R1 HTTP/1.0\n"+                                           "\n");            offset=checkContains(response,offset,                                   "HTTP/1.1 200 OK\015\012","19.6.2 default close")+10;            checkNotContained(response,offset,                                "Connection: close","19.6.2 not assumed");                        offset=0; connector.reopen();            response=connector.getResponses("GET /R1 HTTP/1.0\n"+                                           "Host: localhost\n"+                                           "Connection: keep-alive\n"+                                           "\n"+                                                                                      "GET /R2 HTTP/1.0\n"+                                           "Host: localhost\n"+                                           "Connection: close\n"+                                           "\n"+                                           "GET /R3 HTTP/1.0\n"+                                           "Host: localhost\n"+                                           "Connection: close\n"+                                           "\n");            offset=checkContains(response,offset,                                   "HTTP/1.1 200 OK\015\012","19.6.2 Keep-alive 1")+1;            offset=checkContains(response,offset,                                   "Connection: keep-alive",                                   "19.6.2 Keep-alive 1")+1;                        offset=checkContains(response,offset,                                   "<html>",                                   "19.6.2 Keep-alive 1")+1;                        offset=checkContains(response,offset,                                   "/R1","19.6.2 Keep-alive 1")+1;                        offset=checkContains(response,offset,                                   "HTTP/1.1 200 OK\015\012","19.6.2 Keep-alive 2")+11;            offset=checkContains(response,offset,                                   "Connection: close","19.6.2 Keep-alive close")+1;            offset=checkContains(response,offset,                                   "/R2","19.6.2 Keep-alive close")+3;                        assertEquals("19.6.2 closed",-1,response.indexOf("/R3"));        }        catch(Exception e)        {            e.printStackTrace();            assertTrue(false);        }    }