-
Notifications
You must be signed in to change notification settings - Fork 0
/
Correction_checks
25 lines (17 loc) · 1.16 KB
/
Correction_checks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1) Explain the basics of an HTTP server
- Basics:
The HTTP protocol is a request/response protocol. A client sends a request to the server in the form of a request
method, URI, and protocol version, followed by a MIME(Multipurpose Internet Mail Extensions )-like message containing request modifiers, client
information, and possible body content over a connection with a server. The server responds with a status line,
including the message’s protocol version and a success or error code, followed by a MIME-like message containing
server information, entity metainformation, and possible entity-body content.
Source: RFC 2616
- How this is implemented in this project:
2) Which function has been used for I/O multiplexing?
poll()
3) How does poll() work?
4) Do you use only one poll()? How did you manage accept() and recv()?
5) - poll() or equivalent should be in the main() loop --> Yes, refer to main() function in webserv.cpp.
- should check fd for read and write at the same time --> Yes, refer to class PollFd, function addFd, in PollFd.hpp.
6) Check that if an error returns on recv()/send(), the client socket is removed.
7) Check that errors checked are 0 and -1.