File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ else if (line.toLowerCase(Locale.ROOT).startsWith("last-modified")) {
114114
115115 // constructor for HTTP status codes
116116 public HttpResponse (int statusCode ) {
117- this . version = "HTTP/1.1" ;
118- this . status = statusCode ;
117+ version = "HTTP/1.1" ;
118+ status = statusCode ;
119119
120120 switch (status ) {
121121 case 200 :
@@ -150,7 +150,9 @@ public HttpResponse(int statusCode) {
150150 status = 500 ;
151151 statusMessage = "Internal server error" ;
152152 }
153- this .statusLine = this .version + " " + this .status + " " + this .statusMessage ;
153+ statusLine = version + " " + status + " " + statusMessage ;
154+ String bodyStr = status + " " + statusMessage ;
155+ body .write (bodyStr .getBytes (), 0 , bodyStr .length ());
154156 }
155157
156158 public HttpResponse setStaus (int status ) {
You can’t perform that action at this time.
0 commit comments