Skip to content

Commit

Permalink
Revert: for refactoring by using the answer code
Browse files Browse the repository at this point in the history
제시해준 코드와 비교하면서 리팩토링 하기 위함

This reverts commit 0d73452.
  • Loading branch information
emes-g committed Mar 31, 2024
1 parent 262aaeb commit 4990aa4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/main/java/http/response/HttpResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package http.response;public class HttpResponse {
}
2 changes: 2 additions & 0 deletions src/main/java/http/response/HttpStartLine.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package http.response;public class HttpStartLine {
}
4 changes: 0 additions & 4 deletions src/main/java/webserver/RequestHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ private void response200Header(DataOutputStream dos, int lengthOfBodyContent) {
dos.writeBytes("Content-Type: text/html;charset=utf-8\r\n");
dos.writeBytes("Content-Length: " + lengthOfBodyContent + "\r\n");
dos.writeBytes("\r\n");
dos.flush();
} catch (IOException e) {
log.log(Level.SEVERE, e.getMessage());
}
Expand All @@ -146,7 +145,6 @@ private void response200HeaderWithCss(DataOutputStream dos, int lengthOfBodyCont
dos.writeBytes("Content-Type: text/css;charset=utf-8\r\n");
dos.writeBytes("Content-Length: " + lengthOfBodyContent + "\r\n");
dos.writeBytes("\r\n");
dos.flush();
} catch (IOException e) {
log.log(Level.SEVERE, e.getMessage());
}
Expand All @@ -167,7 +165,6 @@ private void response302Header(DataOutputStream dos, String path) {
dos.writeBytes("HTTP/1.1 302 Found \r\n");
dos.writeBytes("Location: " + path + "\r\n");
dos.writeBytes("\r\n");
dos.flush();
} catch (IOException e) {
log.log(Level.SEVERE, e.getMessage());
}
Expand All @@ -180,7 +177,6 @@ private void response302HeaderWithCookie(DataOutputStream dos, String path) {
dos.writeBytes("Location: " + path + "\r\n");
dos.writeBytes("Set-Cookie: logined=true; Path=/\r\n");
dos.writeBytes("\r\n");
dos.flush();
} catch (IOException e) {
log.log(Level.SEVERE, e.getMessage());
}
Expand Down

0 comments on commit 4990aa4

Please sign in to comment.