server.accept-failed-http.json 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. [
  2. {
  3. "function": "stream_socket_accept",
  4. "params": [
  5. "@mock-socket"
  6. ],
  7. "return": "@mock-stream"
  8. },
  9. {
  10. "function": "stream_get_line",
  11. "params": [
  12. "@mock-stream",
  13. 1024,
  14. "\r\n"
  15. ],
  16. "return": "missing http header"
  17. },
  18. {
  19. "function": "stream_get_meta_data",
  20. "params": [
  21. "@mock-stream"
  22. ],
  23. "return": {
  24. "timed_out": false,
  25. "blocked": true,
  26. "eof": false,
  27. "stream_type": "tcp_socket\/ssl",
  28. "mode": "r+",
  29. "unread_bytes": 171,
  30. "seekable": false
  31. }
  32. },
  33. {
  34. "function": "feof",
  35. "params": [
  36. "@mock-stream"
  37. ],
  38. "return": false
  39. },
  40. {
  41. "function": "stream_get_line",
  42. "params": [
  43. "@mock-stream",
  44. 1024,
  45. "\r\n"
  46. ],
  47. "return": "host: localhost:8000"
  48. },
  49. {
  50. "function": "stream_get_meta_data",
  51. "params": [
  52. "@mock-stream"
  53. ],
  54. "return": {
  55. "timed_out": false,
  56. "blocked": true,
  57. "eof": false,
  58. "stream_type": "tcp_socket\/ssl",
  59. "mode": "r+",
  60. "unread_bytes": 149,
  61. "seekable": false
  62. }
  63. },
  64. {
  65. "function": "feof",
  66. "params": [
  67. "@mock-stream"
  68. ],
  69. "return": false
  70. },
  71. {
  72. "function": "stream_get_line",
  73. "params": [
  74. "@mock-stream",
  75. 1024,
  76. "\r\n"
  77. ],
  78. "return": "user-agent: websocket-client-php"
  79. },
  80. {
  81. "function": "stream_get_meta_data",
  82. "params": [
  83. "@mock-stream"
  84. ],
  85. "return": {
  86. "timed_out": false,
  87. "blocked": true,
  88. "eof": false,
  89. "stream_type": "tcp_socket\/ssl",
  90. "mode": "r+",
  91. "unread_bytes": 115,
  92. "seekable": false
  93. }
  94. },
  95. {
  96. "function": "feof",
  97. "params": [
  98. "@mock-stream"
  99. ],
  100. "return": false
  101. },
  102. {
  103. "function": "stream_get_line",
  104. "params": [
  105. "@mock-stream",
  106. 1024,
  107. "\r\n"
  108. ],
  109. "return": "connection: Upgrade"
  110. },
  111. {
  112. "function": "stream_get_meta_data",
  113. "params": [
  114. "@mock-stream"
  115. ],
  116. "return": {
  117. "timed_out": false,
  118. "blocked": true,
  119. "eof": false,
  120. "stream_type": "tcp_socket\/ssl",
  121. "mode": "r+",
  122. "unread_bytes": 94,
  123. "seekable": false
  124. }
  125. },
  126. {
  127. "function": "feof",
  128. "params": [
  129. "@mock-stream"
  130. ],
  131. "return": false
  132. },
  133. {
  134. "function": "stream_get_line",
  135. "params": [
  136. "@mock-stream",
  137. 1024,
  138. "\r\n"
  139. ],
  140. "return": "upgrade: websocket"
  141. },
  142. {
  143. "function": "stream_get_meta_data",
  144. "params": [
  145. "@mock-stream"
  146. ],
  147. "return": {
  148. "timed_out": false,
  149. "blocked": true,
  150. "eof": false,
  151. "stream_type": "tcp_socket\/ssl",
  152. "mode": "r+",
  153. "unread_bytes": 74,
  154. "seekable": false
  155. }
  156. },
  157. {
  158. "function": "feof",
  159. "params": [
  160. "@mock-stream"
  161. ],
  162. "return": false
  163. },
  164. {
  165. "function": "stream_get_line",
  166. "params": [
  167. "@mock-stream",
  168. 1024,
  169. "\r\n"
  170. ],
  171. "return": "no key in upgrade request"
  172. },
  173. {
  174. "function": "stream_get_meta_data",
  175. "params": [
  176. "@mock-stream"
  177. ],
  178. "return": {
  179. "timed_out": false,
  180. "blocked": true,
  181. "eof": false,
  182. "stream_type": "tcp_socket\/ssl",
  183. "mode": "r+",
  184. "unread_bytes": 29,
  185. "seekable": false
  186. }
  187. },
  188. {
  189. "function": "feof",
  190. "params": [
  191. "@mock-stream"
  192. ],
  193. "return": false
  194. },
  195. {
  196. "function": "stream_get_line",
  197. "params": [
  198. "@mock-stream",
  199. 1024,
  200. "\r\n"
  201. ],
  202. "return": "sec-websocket-version: 13"
  203. },
  204. {
  205. "function": "stream_get_meta_data",
  206. "params": [
  207. "@mock-stream"
  208. ],
  209. "return": {
  210. "timed_out": false,
  211. "blocked": true,
  212. "eof": false,
  213. "stream_type": "tcp_socket\/ssl",
  214. "mode": "r+",
  215. "unread_bytes": 2,
  216. "seekable": false
  217. }
  218. },
  219. {
  220. "function": "feof",
  221. "params": [
  222. "@mock-stream"
  223. ],
  224. "return": false
  225. }
  226. ,
  227. {
  228. "function": "stream_get_line",
  229. "params": [
  230. "@mock-stream",
  231. 1024,
  232. "\r\n"
  233. ],
  234. "return": ""
  235. },
  236. {
  237. "function": "stream_get_meta_data",
  238. "params": [
  239. "@mock-stream"
  240. ],
  241. "return": {
  242. "timed_out": false,
  243. "blocked": true,
  244. "eof": false,
  245. "stream_type": "tcp_socket\/ssl",
  246. "mode": "r+",
  247. "unread_bytes": 0,
  248. "seekable": false
  249. }
  250. },
  251. {
  252. "function": "feof",
  253. "params": [
  254. "@mock-stream"
  255. ],
  256. "return": false
  257. }
  258. ]