From 43207857164caeef4c7a30f9d3ff69d4a0640f7f Mon Sep 17 00:00:00 2001 From: hepin1989 Date: Tue, 23 May 2017 20:59:24 +0800 Subject: [PATCH] change to html to make it display right --- chapter12/src/main/java/nia/chapter12/HttpRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter12/src/main/java/nia/chapter12/HttpRequestHandler.java b/chapter12/src/main/java/nia/chapter12/HttpRequestHandler.java index b781cde0..cd67de6f 100644 --- a/chapter12/src/main/java/nia/chapter12/HttpRequestHandler.java +++ b/chapter12/src/main/java/nia/chapter12/HttpRequestHandler.java @@ -51,7 +51,7 @@ public void channelRead0(ChannelHandlerContext ctx, request.getProtocolVersion(), HttpResponseStatus.OK); response.headers().set( HttpHeaders.Names.CONTENT_TYPE, - "text/plain; charset=UTF-8"); + "text/html; charset=UTF-8"); boolean keepAlive = HttpHeaders.isKeepAlive(request); if (keepAlive) { response.headers().set(