Merge remote-tracking branch 'origin/master' into init_auto
[nit.git] / tests / sav / test_nitcorn.res
1
2 [Client] curl -s localhost:*****/simple_answer
3 [Response] Simple answer
4 Method: GET, URI: /simple_answer, trailing: /
5
6 [Client] curl -s localhost:*****/simple_answer/
7 [Response] Simple answer
8 Method: GET, URI: /simple_answer/, trailing: /
9
10 [Client] curl -s localhost:*****/simple_answer/trailing/path
11 [Response] Simple answer
12 Method: GET, URI: /simple_answer/trailing/path, trailing: /trailing/path
13
14 [Client] curl -s 'localhost:*****/simple_answer?i=0123&s=asdf'
15 [Response] Simple answer
16 Method: GET, URI: /simple_answer, trailing: /
17 GET args: i:0123, s:asdf
18
19 [Client] curl -s localhost:*****/simple_answer --data 'i=0123&s=asdf'
20 [Response] Simple answer
21 Method: POST, URI: /simple_answer, trailing: /
22 POST args: i:0123, s:asdf
23
24 [Client] curl -s localhost:*****/simple_answer --cookie 'i=0123; s=asdf'
25 [Response] Simple answer
26 Method: GET, URI: /simple_answer, trailing: /
27 Cookie: i:0123, s:asdf
28
29 [Client] curl -s localhost:*****/params_answer/0123/asdf
30 [Response] Simple answer
31 Method: GET, URI: /params_answer/0123/asdf, trailing: /
32 Params args: i:0123, s:asdf
33
34 [Client] curl -s localhost:*****/params_answer/0123/
35 [Response] Simple answer
36 Method: GET, URI: /params_answer/0123/, trailing: /
37 Params args: i:0123, s:
38
39 [Client] curl -s localhost:*****/params_answer/0123/asdf/trailing/path
40 [Response] Simple answer
41 Method: GET, URI: /params_answer/0123/asdf/trailing/path, trailing: /trailing/path
42 Params args: i:0123, s:asdf
43
44 [Client] curl -s localhost:*****/params_answer/0123 --head
45 HTTP/1.0 404 Not Found\r
46 Content-Length: 0\r
47 Server: nitcorn\r
48 Set-Cookie: nitcorn_session=; HttpOnly; expires=Thu, 01 Jan 1970 00:00:00 GMT\r
49 \r
50
51 [Client] curl -s localhost:*****/file_server/
52 <!DOCTYPE html>
53 <head>
54         <meta charset="utf-8">
55         <meta http-equiv="X-UA-Compatible" content="IE=edge">
56         <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
57         <script>
58                 
59         </script>
60         <title>/</title>
61 </head>
62 <body>
63         
64         <div class="container">
65                 <h1>/</h1>
66                 <ul>
67                         <li><a href="a.txt">a.txt</a></li>
68                         <li><a href="b.txt">b.txt</a></li>
69                         <li><a href="binary_file.png">binary_file.png</a></li>
70                 </ul>
71         </div>
72 </body>
73 </html>
74 [Client] curl -s localhost:*****/file_server/ --head
75 HTTP/1.0 200 OK\r
76 Content-Type: text/html\r
77 Content-Length: 467\r
78 Server: nitcorn\r
79 Set-Cookie: nitcorn_session=; HttpOnly; expires=Thu, 01 Jan 1970 00:00:00 GMT\r
80 \r
81
82 [Client] curl -s localhost:*****/file_server --head
83 HTTP/1.0 303 See Other\r
84 Location: /file_server/\r
85 Content-Length: 0\r
86 Server: nitcorn\r
87 Set-Cookie: nitcorn_session=; HttpOnly; expires=Thu, 01 Jan 1970 00:00:00 GMT\r
88 \r
89
90 [Client] curl -s localhost:*****/file_server/a.txt
91 aaaAAAAAaaaa
92
93 [Client] curl -s localhost:*****/file_server/a.txt --head
94 HTTP/1.0 200 OK\r
95 Content-Type: text/plain\r
96 cache-control: public, max-age=360\r
97 Content-Length: 13\r
98 Server: nitcorn\r
99 Set-Cookie: nitcorn_session=; HttpOnly; expires=Thu, 01 Jan 1970 00:00:00 GMT\r
100 \r
101
102 [Client] curl -s localhost:*****/file_server/binary_file.png --head
103 HTTP/1.0 200 OK\r
104 Content-Type: image/png\r
105 cache-control: public, max-age=360\r
106 Content-Length: 2503\r
107 Server: nitcorn\r
108 Set-Cookie: nitcorn_session=; HttpOnly; expires=Thu, 01 Jan 1970 00:00:00 GMT\r
109 \r
110
111 [Client] curl -s localhost:*****/file_server/binary_file.png | diff - .../binary_file.png
112
113 [Client] curl -s localhost:*****/file_server/unknown_file.txt --head
114 HTTP/1.0 404 Not Found\r
115 Content-Length: 329\r
116 Server: nitcorn\r
117 Set-Cookie: nitcorn_session=; HttpOnly; expires=Thu, 01 Jan 1970 00:00:00 GMT\r
118 \r
119
120 [Client] curl -s localhost:*****/invalid_route --head
121 HTTP/1.0 404 Not Found\r
122 Content-Length: 0\r
123 Server: nitcorn\r
124 Set-Cookie: nitcorn_session=; HttpOnly; expires=Thu, 01 Jan 1970 00:00:00 GMT\r
125 \r