Skip to content

Commit 611c868

Browse files
committed
Update README.md
1 parent 5cd9cb3 commit 611c868

File tree

1 file changed

+48
-32
lines changed

1 file changed

+48
-32
lines changed

README.md

Lines changed: 48 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -210,62 +210,78 @@ HttpServer 采用 Java NIO.2 模型进行开发,使用了 `java.nio.channels.A
210210

211211
### 3.1.1 接收
212212

213-
- 支持 `GET``POST` 请求,相关测试: [LoginSystemTests](./src/test/java/loginsystemtests/LoginSystemTests.java)
214-
213+
#### 3.1.1.1 支持 `GET``POST` 请求
214+
215+
相关测试: [LoginSystemTests](./src/test/java/loginsystemtests/LoginSystemTests.java)
216+
215217
<img src="./docs/image/feature_get.png" alt="GET" width="300"> <img src="./docs/image/feature_post.png" alt="POST" width="300">
216218

217-
- 支持以下状态码:
218-
- 200 OK<br/>
219+
#### 3.1.1.2 支持以下状态码:
220+
221+
- 200 OK<br/>
219222
<img src="./docs/image/feature_status_200.png" alt="200" width="300">
220223

221-
- 301 Moved Permanently<br/>
224+
- 301 Moved Permanently<br/>
222225
<img src="./docs/image/feature_status_301.png" alt="301" width="300">
223226

224-
- 302 Found<br/>
225-
<img src="./docs/image/feature_status_302.png" alt="302" width="300">
227+
- 302 Found<br/>
228+
<img src="./docs/image/feature_status_302.png" alt="302" width="300">
229+
230+
- 304 Not Modified<br/>
231+
<img src="./docs/image/feature_status_304.png" alt="304" width="300">
232+
233+
- 404 Not Found<br/>
234+
<img src="./docs/image/feature_status_404.png" alt="404" width="300">
235+
236+
- 405 Method Not Allowed<br/>
237+
<img src="./docs/image/feature_status_405.png" alt="405" width="300">
238+
239+
- 500 Internal Server Error<br/>
240+
<img src="./docs/image/feature_status_500.png" alt="500" width="300">
226241

227-
- 304 Not Modified<br/>
228-
<img src="./docs/image/feature_status_304.png" alt="304" width="300">
242+
- 505 HTTP Version Not Supported<br/>
243+
<img src="./docs/image/feature_status_505.png" alt="505" width="300">
229244

230-
- 404 Not Found<br/>
231-
<img src="./docs/image/feature_status_404.png" alt="404" width="300">
245+
#### 3.1.1.3 支持长连接 (Keep-Alive)
232246

233-
- 405 Method Not Allowed<br/>
234-
<img src="./docs/image/feature_status_405.png" alt="405" width="300">
247+
相关测试:[KeepAliveTest](./src/test/java/servertests/KeepAliveTest.java)
235248

236-
- 500 Internal Server Error<br/>
237-
<img src="./docs/image/feature_status_500.png" alt="500" width="300">
249+
<img src="./docs/image/feature_keep_alive.png" alt="Keep-Alive">
250+
#### 3.1.1.4 支持MIME类型:
238251

239-
- 505 HTTP Version Not Supported<br/>
240-
<img src="./docs/image/feature_status_505.png" alt="505" width="300">
252+
已测试过的全部类型: [mime.json](./src/main/resources/mime.json)
241253

242-
- 支持长连接 (Keep-Alive) ,相关测试:[KeepAliveTest](./src/test/java/servertests/KeepAliveTest.java)<br/>
243-
<img src="./docs/image/feature_keep_alive.png" alt="Keep-Alive">
254+
理论支持任意文件传输
244255

245-
- 支持MIME类型: <br/> 已测试过的全部类型: [mime.json](./src/main/resources/mime.json)<br/>理论支持任意文件传输
246-
- HTML: `text/html`<br/>
256+
- HTML: `text/html`<br/>
247257
<img src="./docs/image/feature_mime_html.png" alt="HTML" width="500">
248258

249-
- png: `image/png`<br/>
250-
<img src="./docs/image/feature_mime_png.png" alt="PNG" width="500">
259+
- png: `image/png`<br/>
260+
<img src="./docs/image/feature_mime_png.png" alt="PNG" width="500">
251261

252-
- mp4: `video/mp4`<br/>
262+
- mp4: `video/mp4`<br/>
253263
<img src="./docs/image/feature_mime_mp4.png" alt="MP4" width="500">
254264

255-
- svg: `image/svg+xml`<br/>
265+
- svg: `image/svg+xml`<br/>
256266
<img src="./docs/image/feature_mime_svg.png" alt="SVG" width="500">
257267

258-
- 编写了注册、登录、状态保持系统
259-
260-
1. 用户注册<br/>
268+
#### 3.1.1.5 支持注册、登录、状态保持系统
269+
270+
相关测试: [LoginSystemTests](./src/test/java/loginsystemtests/LoginSystemTests.java)
271+
272+
1. 用户注册<br/>
261273
<img src="./docs/image/feature_loginsys_1.png" alt="loginsys_1" width="500">
262-
2. 检查登录状态<br/>
274+
275+
2. 检查登录状态<br/>
263276
<img src="./docs/image/feature_loginsys_2.png" alt="loginsys_2" width="500">
264-
3. 登出<br/>
277+
278+
3. 登出<br/>
265279
<img src="./docs/image/feature_loginsys_3.png" alt="loginsys_3" width="500">
266-
4. 检查登录状态<br/>
280+
281+
4. 检查登录状态<br/>
267282
<img src="./docs/image/feature_loginsys_4.png" alt="loginsys_4" width="500">
268-
5. 登录<br/>
283+
284+
5. 登录<br/>
269285
<img src="./docs/image/feature_loginsys_5.png" alt="loginsys_5" width="500">
270286

271287
## 3.2 HttpClient

0 commit comments

Comments
 (0)