@@ -39,6 +39,59 @@ public function testParseResponseMultipleHeaders()
3939 $ this assertEquals ($ expectedHeaders$ headers
4040 }
4141
42+  public  function  testParseContinuePlusResponse ()
43+  {
44+  $ raw"HTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 201 Created \r\nContent-Type: text/html \r\nDate: Fri, 19 Jun 2015 16:05:18 GMT \r\nVary: Accept-Encoding \r\nContent-Length: 0 \r\n\r\n" ;
45+  list ($ status$ headers$ bodyparseResponse ($ raw
46+ 
47+  $ expectedHeadersarray (
48+  'Content-Type: text/html ' ,
49+  'Date: Fri, 19 Jun 2015 16:05:18 GMT ' ,
50+  'Vary: Accept-Encoding ' ,
51+  'Content-Length: 0 ' 
52+  );
53+  
54+  $ this assertEquals ('HTTP/1.1 201 Created ' , $ status
55+  $ this assertEquals (null , $ body
56+  $ this assertEquals ($ expectedHeaders$ headers
57+  }
58+  
59+  public  function  testParseiMultipleContinuePlusResponse ()
60+  {
61+  $ raw"HTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 201 Created \r\nContent-Type: text/html \r\nDate: Fri, 19 Jun 2015 16:05:18 GMT \r\nVary: Accept-Encoding \r\nContent-Length: 0 \r\n\r\n" ;
62+  list ($ status$ headers$ bodyparseResponse ($ raw
63+ 
64+  $ expectedHeadersarray (
65+  'Content-Type: text/html ' ,
66+  'Date: Fri, 19 Jun 2015 16:05:18 GMT ' ,
67+  'Vary: Accept-Encoding ' ,
68+  'Content-Length: 0 ' 
69+  );
70+  
71+  $ this assertEquals ('HTTP/1.1 201 Created ' , $ status
72+  $ this assertEquals (null , $ body
73+  $ this assertEquals ($ expectedHeaders$ headers
74+  }
75+ 
76+ 
77+  public  function  testParseContinuePlusResponseMultipleHeaders ()
78+  {
79+  $ raw"HTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 201 Created \r\nContent-Type: text/html \r\nDate: Fri, 19 Jun 2015 16:05:18 GMT \r\nVary: Accept, Accept-Language, Expect \r\nVary: Accept-Encoding \r\nContent-Length: 0 \r\n\r\n" ;
80+  list ($ status$ headers$ bodyparseResponse ($ raw
81+  
82+  $ expectedHeadersarray (
83+  'Content-Type: text/html ' ,
84+  'Date: Fri, 19 Jun 2015 16:05:18 GMT ' ,
85+  'Vary: Accept, Accept-Language, Expect ' ,
86+  'Vary: Accept-Encoding ' ,
87+  'Content-Length: 0 ' 
88+  );
89+  
90+  $ this assertEquals ('HTTP/1.1 201 Created ' , $ status
91+  $ this assertEquals (null , $ body
92+  $ this assertEquals ($ expectedHeaders$ headers
93+  }
94+ 
4295 public  function  testParseHeadersBasic ()
4396 {
4497 $ inputArrayarray (
0 commit comments