7. - Berners-Lee first proposed the "WorldWideWeb" project in 1989.
- The first documented version of HTTP was HTTP V0.9 (1991).
- Dave Raggett led the HTTP Working Group (HTTP WG) in 1995.
- RFC 1945 officially introduced and recognized HTTP V1.0 in 1996.
- The HTTP/1.1, RFC 2068 was officially released in January 1997
11. Packet
It is text based
HTTP/1.1 200 OK
Date: Thu, 20 May 2010 01:43:23 GMT
Server: Nginx/1.3
Cache-Control: no-cache, no-Store
<html>
<p>hello World</p>
</html>
GET / HTTP/1.1
12. Request packet
POST / HTTP/1.1
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0
Accept-Encoding:gzip, deflate, sdch
Accept-Language:ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4,ja;q=0.2
Cache-Control:max-age=0
Connection:keep-alive
Host:www.w3.org
Referer:https://www.google.co.kr/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.3
search=google&utf-8=&page=10
25. GET
HEAD
PUT
DELETE
OPTIONS
CONNECT
자료를 요청
Requests a representation
of the specified resource.
Asks for the response identical to
the one that would correspond
to a GET request,
but without the response body.
자료의 존재 요청
POST TRACE
자료 업로드
Requests that the server accept
the entity enclosed in the request
자료 수정
Requests that the enclosed entity be
stored under the supplied,
If already existing resource, it is modified
자료 삭제
Deletes the specified resource
Echoes back the received request
changes or additions
서버 확인
Returns the HTTP methods that the
server supports for the specified URL
가능한 메소드 확인
Converts the request connection to
a transparent TCP/IP tunnel
Applies partial modifications
to a resource
PATCH
부분적 수정
26. GET
자료를 요청
Requests a representation of the specified resource.
C has published guidance principles on this distinction, saying, "Web applicatio
27. HEAD
Asks for the response identical to the
one that would correspond to a GET request,
but without the response body.
This is useful for retrieving meta-information written
in response headers, without having to transport the entire content.
자료의 존재 요청
28. Requests that the server accept the entity
enclosed in the request as a new subordinate
of the web resource identified by the URI.
The data POSTed might be, for example, an annotation for existing resources;
a message for a bulletin board, newsgroup, mailing list, or comment thread;
a block of data that is the result of submitting
a web form to a data-handling process; or an item to add to a database.
POST
자료 업로드
29. Requests that the enclosed entity be stored under the supplied URI.
If the URI refers to an already existing resource, it is modified;
if the URI does not point to an existing resource,
then the server can create the resource with that URI.
PUT
자료 수정
31. eived request so that a client can see what (if any) changes or additions have been made by i
TRACE
서버 확인
32. Converts the request connection to a transparent TCP/IP tunnel,
usually to facilitate SSL-encrypted communication (HTTPS) through
an unencrypted HTTP proxy. See HTTP CONNECT tunneling.
OPTIONS
가능한 메소드 확인
33. Returns the HTTP methods that the server supports for the specified URL.
This can be used to check the functionality
of a web server by requesting instead of a specific resource.
CONNECT
42. 100 200 300 400 500
Status code <response code>
43. Informational 1xx
100 Continue
서버는 이 코드를 제공하여 요청의
첫 번째 부분을 받았으며 나머지를 기다리고 있음을 나타낸
101 Switching Protocols
서버에 프로토콜 전환을 요청했으며
서버는 이를 승인하는 중이다.
44. 200 OK
이는 주로 서버가 요청한 페이지를 제공했다는 의미로 쓰인
201 Created
서버가 새 리소스를 작성했다.
202 Accepted
접수했지만 아직 처리하지 않았다.
203 Non-Authoritative Information
다른 소스에서 수신된 정보를 제공하고 있다.
204 No Content
처리했지만 콘텐츠를 제공하지 않는다.
205 Reset Content
문서 보기를 재설정할 것을 요구한다
206 Partial Content
일부만 성공적으로 처리했다.
Successful 2xx
45. 300 Multiple Choices
서버가 사용자 에이전트에 따라 수행할 작업을 선택하거나
요청자가 선택할 수 있는 작업 목록을 제공한다.
301 Moved Permanently
GET 또는 HEAD 요청에 대한 응답으로
이 응답을 표시하면 요청자가 자동으로 새 위치로 전달된다
302 Found
요청자는 향후 요청 시 원래 위치를 계속 사용해야 한다.
304 Not Modified
마지막 요청 이후 요청한 페이지는 수정되지 않았다.
307 Temporary Redirect
현재 서버가 다른 위치의 페이지로 요청에
응답하고 있지만 요청자는 향후 요청 시
원래 위치를 계속 사용해야 한다.
Redirection 3xx
46. 400 Bad Request
서버가 요청의 구문을 인식하지 못했다.
401 Unauthorized
서버는 로그인이 필요한 페이지에
대해 이 요청을 제공할 수 있다.
404 Not Found
서버가 요청한 페이지를 찾을 수 없다.
405 Method Not Allowed
요청에 지정된 방법을 사용할 수 없다.
408 Request Timeout
서버의 요청 대기가 시간을 초과하였다.
413 Request Entity Too Large
요청이 너무 커서 서버가 처리할 수 없다.
Client Error 4xx
47. Server Error 5xx 500 Internal Server Error
서버에 오류가 발생하여 요청을 수행할 수 없다.
501 Not Implemented
서버에 요청을 수행할 수 있는 기능이 없다.
502 Bad Gateway
서버가 게이트웨이나 프록시일때,
업스트림 서버에서 잘못된 응답을 받았다.
503 Service Unavailable
서버가 오버로드되었거나 유지관리를 위해 다운됨.
504 Gateway Timeout
서버가 게이트웨이나 프록시일때,
응답을 제때 못 받았다.
505 HTTP Version Not Supported
사용된 HTTP 프로토콜 버전을 지원하지 않는다.
52. Server : 어떤 서버 프로그램의 정보를 클라이언트에게 제공
Host : 요청하는 도메인을 제공
ex) Server: nginx/1.7
ex) Host: www.example.com
Location : Moved 일 경우 이동할 주소를 제공
ex) Location: www.example.com
ex) Date: Wed, 15 Nov 1995 06:25:24 GMT
Date : 서버의 시간을 제공
62. compress – UNIX "compress" program method
deflate – compression based on the deflate algorithm, wrapped inside the zlib data format
exi – W3C Efficient XML Interchange
gzip – GNU zip format. This method is the most broadly supported
identity – No transformation is used. This is the default value for content coding.
pack200-gzip – Network Transfer Format for Java Archives.
bzip2 – compression based on the free bzip2 format, supported by lighttpd
lzma – compression based on (raw) LZMA is available in Opera 20, and in elinks via a compile-time
option
peerdist – Microsoft Peer Content Caching and Retrieval
sdch – Google Shared Dictionary Compression for HTTP, based on VCDIFF.
xz - LZMA2-based content compression, supported by a non-official Firefox patch.
Accept-Encoding: gzip, deflate, sdch
78. Mozilla/2.02Gold (Win95; I)
64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6
osh; U; PPC Mac OS X; en) AppleWebKit/312.8.1 (KHTML, like G
79. Mozilla/2.02Gold (Win95; I)
64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6
osh; U; PPC Mac OS X; en) AppleWebKit/312.8.1 (KHTML, like G
????
80. la/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like G
osh; U; PPC Mac OS X; en) AppleWebKit/312.8.1 (KHTML, like G
Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chro
104. - Request headerHTTP 1.1
General-header
Cahce-Control max-age=0
End-to-End revalidation
모든 프록시에 대해 재검증 요청
105. - Request headerHTTP 1.1
Check modified
If-Match
If-None-Match
해당 e-tag가 있어야 진행이 됨
해당 e-tag가 존재하지 않아야 진행
106. - Request headerHTTP 1.1
Check modified
e-tag
The ETag or entity tag is part of HTTP.
It is one of several mechanisms that HTTP provides for
web cache validation.
It is provided by server.
107. - Request headerHTTP 1.1
Check modified
If-Match 해당 e-tag가 있어야 진행이 됨
412 (Precondition Failed) response Condition :
- none of the entity tags match,
- “*" is given and no current entity exists
Ignore Condition :
- any of the entity tags match
- if the request results in anything other than a 2xx or 412 status (without If-M
- if "*" is given and any current entity exists for the resource
108. - Request headerHTTP 1.1
Check modified
If-None-Match 해당 e-tag가 존재하지 않아야 진행
304 Not Modified Condition :
- e tag is existed
If-None-Match: *
304 Not Modified Condition :
- if the resource is there and the other condition is met
118. The max-age directive takes priority over Expires, so if max-age is
present in a response, the calculation is simply:
freshness_lifetime = max_age_value
Otherwise, if Expires is present in the response, the calculation is:
freshness_lifetime = expires_value - date_value
125. - Berners-Lee first proposed the "WorldWideWeb" project in 1989.
- The first documented version of HTTP was HTTP V0.9 (1991).
- Dave Raggett led the HTTP Working Group (HTTP WG) in 1995.
- RFC 1945 officially introduced and recognized HTTP V1.0 in 1996.
- The HTTP/1.1, RFC 2068 was officially released in January 1997
146. IIS supports HTTP/2 in Windows 10 beta
NGINX plans to support HTTP/2 by the end of 2015
Apache SPDY via the mod_spdy module
Server
Compatibility
Browser
Chrome supports HTTP/2 by default (version 41)
Firefox supports HTTP/2 enabled by default (version 36)
IE supports HTTP/2 (version 11, but only for Windows 10 beta)