EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
Java代做
您的位置: 主页 > 编程案例 > Java代做 >
代做Java:Computer Networks代写 HTTP Server代写 project代写 code代写 - Java代做
发布时间:2021-07-25 21:17:20浏览次数:
CS4333/6333 Computer NetworksComputer Networks代写 HTTP 1.1 [RFC 2616] defines the following methods: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE and CONNECT. The goal of this projectPROJECT 3: HTTP ServerCS4333/6333 Computer NetworksFall 2019HTTP 1.1 [RFC 2616] defines the following methods: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE and CONNECT. The goal of this project is to implement a minimal HTTP 1.1 server supporting and implementing only the GET and HEAD methods. This protocol typically runs on top of TCP on port 80.Computer Networks代写1 Description Computer Networks代写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-like message containing request modifiers, client information, and possibly 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 possibly entity-body content.Where a URI (Uniform Resource Identifier) is either a URL (Uniform Resource Location) or a URN (Uniform Resource Name). Throughout this document the following notation is used: SP is a blank space and CRLF is a carriage return followed by a line feed character. URIs have been known by many names: WWW addresses, Universal Document Identifiers, Universal Resource Identifiers , and finally the combination of Uniform Resource Locators (URL) and Names (URN). As far as HTTP is concerned, Uniform Resource Identifiers are simply formatted strings which identify via name, location, or any other characteristic a resource.Computer Networks代写Computer Networks代写2 Client Request Computer Networks代写The general form for an HTTP/1.1 request is:Method SP Request-URI SP HTTP/1.1 CRLF([general-header line | request-header line | entity-header line] CRLF)* CRLF[message body]For this project you are only required to implement the GET and HEAD method. Note that a request maybe followed by several other lines (some of them are mandatory as explained below) ended with a CRLF.The end of the header lines is indicated by the client by sending an additional CRLF. The [message body] part will not be used in this project. The message body part is where you would place data being sent to the server, e.g. if we were implementing the PUT method, the message body would contain the data to be sent to the server.Computer Networks代写Any HTTP/1.1 compliant client must include a Host request-header field identifying the internet host (the server) they are connecting to and the port number:Host: hostname[:port] Computer Networks代写The port number must be included unless the server is using the default port 80. For the header lines, the notation (…)* means zero or more of the strings enclosed in parenthesis. If the machine where the server is running does not have a DNS name, you may use the IP address for hostname.Your server must check for the Host request header field before serving the request. If there is no Host request-header, the server must return an error code as specified in the following section.Computer Networks代写In summary, a minimal and valid GET request on a server named neo.mcs.utulsa.edu running on port 16405 for a file or resource named index.html will look like:GET /index.html HTTP/1.1 CRLF Host: neo.mcs.utulsa.edu:16405 CRLF CRLFThe same request as sent by MS Internet Explorer 6.0 looks like: GET /index.html HTTP/1.1 CRLFAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* CRLFAccept-Language: en-us CRLF Accept-Encoding: gzip, deflate CRLFUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461) CRLF Host: neo.mcs.utulsa.edu:16405 CRLF Computer Networks代写Connection: Keep-Alive CRLF CRLFNote in this case that the client is sending lots of information to the server. It basically notifies the server what kinds of file Internet Explorer accepts (Accept lines) and a User-Agent line that notifies the server that the client is IE 6.0 running on a Windows 2000 machine.Remember that there could be more lines following the GET method request. Your server must look among those lines for a Host request-header field before it is served (and return an error code if the line is missing). Your server can safely ignore the lines that are not strictly required by the server in order to process a client’s request.3 Server Response Computer Networks代写After receiving and interpreting a request message, a server responds with an HTTP response message. The general form of a response message consists of several lines: (i) a status line followed by a CRLF, (ii)zero or more header lines followed by a CRLF (also called entity headers), (iii) a CRLF indicating the end of the header lines and (iv) a message body if necessary containing the requested data. The general form of the response message then is:HTTP/1.1 SP StatusCode SP ReasonPhrase CRLF([( general-header line | response-header line | entity-header line) CRLF) * CRLF[ message-body ] Computer Networks代写Note: the only difference between a server response to a GET and a server response to a HEAD is that when the server responds to a HEAD request, the message body is empty (only the header lines associated with the request are sent back to the client).3.1 Status LineHTTP/1.1 SP StatusCode SP ReasonPhrase CRLFThe StatusCode element is a 3-digit integer result code of the attempt to understand and satisfy the request. These codes are fully defined in section 10 of RFC 2616. The ReasonPhrase is intended to give a short textual description of the StatusCode. The StatusCode is intended for use by automata and the ReasonPhrase is intended for the human user. The client is not required to examine or display the ReasonPhrase.Computer Networks代写The first digit of the StatusCode defines the class of response. The last two digits do not have any categorization role. There are 5 values for the first digit:1xx: Informational Request received, continuing2xx: Success The action was successfully received, understood, and3xx: Redirection Further action must be taken in order to complete the4xx: Client Error The request contains bad syntax or cannot be5xx: Server Error The server failed to fulfill an apparently validThe following table summarizes the status codes and reason phrases that your server MUST implement

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。