SlideShare a Scribd company logo
1 of 147
Luavis http://github.com/luavis
HTTP
Hyper Text Transfer Protocol
Luavis http://github.com/luavis
HTTP
Hyper Text Transfer Protocol
History
Packet
Method
Status Code
Headers
2
Hyper Text
HTML
Hyper Text Markup Language
Hyper Text Transfer
하이퍼 텍스트를옮기는 프로토콜
Protocol
History
HTTP
Tim Berners-Lee and his team at CERN
- 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
Packet
HTTP
Protocol
Network
Application
Presentation
Session
Transfer
Data link
Physical
OSI 7 Layers
Protocol
Network
Application
Presentation
Session
Transfer
Data link
Physical
TCP/IP/Ethernet
HTTP
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
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
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
Request packet
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
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
HTTP/1.1 200 OK
Content-Language:en
Content-Location:O-HTTP-charset.en.php
Content-Type:text/html; charset=UTF-8
Date:Tue, 19 May 2015 15:23:39 GMT
P3P:policyref="http://www.w3.org/2014/08/p3p.xml"
Server:Apache/2
TCN:choice
Transfer-Encoding:chunked
Vary:negotiate,accept-language
<html>
<p>hello World</p>
</html>
Response packet
HTTP/1.1 200 OK
Content-Language:en
Content-Location:O-HTTP-charset.en.php
Content-Type:text/html; charset=UTF-8
Date:Tue, 19 May 2015 15:23:39 GMT
P3P:policyref="http://www.w3.org/2014/08/p3p.xml"
Server:Apache/2
TCN:choice
Transfer-Encoding:chunked
Vary:negotiate,accept-language
<html>
<p>hello World</p>
</html>
Response packet
HTTP/1.1 200 OK
Content-Language:en
Content-Location:O-HTTP-charset.en.php
Content-Type:text/html; charset=UTF-8
Date:Tue, 19 May 2015 15:23:39 GMT
P3P:policyref="http://www.w3.org/2014/08/p3p.xml"
Server:Apache/2
TCN:choice
Transfer-Encoding:chunked
Vary:negotiate,accept-language
<html>
<p>hello World</p>
</html>
Response packet
HTTP/1.1 200 OK
Content-Language:en
Content-Location:O-HTTP-charset.en.php
Content-Type:text/html; charset=UTF-8
Date:Tue, 19 May 2015 15:23:39 GMT
P3P:policyref="http://www.w3.org/2014/08/p3p.xml"
Server:Apache/2
TCN:choice
Transfer-Encoding:chunked
Vary:negotiate,accept-language
<html>
<p>hello World</p>
</html>
Response packet
GET / HTTP/1.1
Method
Path
Version
Request packet
Method
HTTP
GET / HTTP/1.1
Method
Path
Version
Method
GET
HEAD
POST
PUT
DELETE
TRACE
OPTIONS
CONNECT
PATCH
Request packet
GET / HTTP/1.1
Method
Path
Version
Method
GET
HEAD
POST
PUT
DELETE
TRACE
OPTIONS
CONNECT
PATCH
General Usage
Request packet
GET / HTTP/1.1
Method
Path
Version
Request packet
Method
GET
HEAD
POST
PUT
DELETE
TRACE
OPTIONS
CONNECT
PATCH
RESTFUL Usage
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
부분적 수정
GET
자료를 요청
Requests a representation of the specified resource.
C has published guidance principles on this distinction, saying, "Web applicatio
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.
자료의 존재 요청
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
자료 업로드
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
자료 수정
Deletes the specified resource.
DELETE
자료 삭제
eived request so that a client can see what (if any) changes or additions have been made by i
TRACE
서버 확인
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
가능한 메소드 확인
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
Applies partial modifications to a resource.
PATCH
부분적 수정
GET / HTTP/1.1
Method
Path
Version
Request packet
http://see.ssu.ac.kr/pydio/4.Enjoy/Movies
http:// see.ssu.ac.kr /pydio/4.Enjoy/Movies/
pathdomainprotocol
HTTP/1.1
Content-Language:en
Content-Location:O-HTTP-charset.en.php
Content-Type:text/html; charset=UTF-8
Date:Tue, 19 May 2015 15:23:39 GMT
P3P:policyref="http://www.w3.org/2014/08/p3p.xml"
Server:Apache/2
TCN:choice
Transfer-Encoding:chunked
Vary:negotiate,accept-language
<html>
<p>hello World</p>
</html>
Response packet
200 OK
HTTP/1.1
Content-Language:en
Content-Location:O-HTTP-charset.en.php
Content-Type:text/html; charset=UTF-8
Date:Tue, 19 May 2015 15:23:39 GMT
P3P:policyref="http://www.w3.org/2014/08/p3p.xml"
Server:Apache/2
TCN:choice
Transfer-Encoding:chunked
Vary:negotiate,accept-language
<html>
<p>hello World</p>
</html>
Response packet
200 OK
Status Code
HTTP
For example
100 200 300 400 500
Status code <response code>
Informational 1xx
100 Continue
서버는 이 코드를 제공하여 요청의
첫 번째 부분을 받았으며 나머지를 기다리고 있음을 나타낸
101 Switching Protocols
서버에 프로토콜 전환을 요청했으며
서버는 이를 승인하는 중이다.
200 OK
이는 주로 서버가 요청한 페이지를 제공했다는 의미로 쓰인
201 Created
서버가 새 리소스를 작성했다.
202 Accepted
접수했지만 아직 처리하지 않았다.
203 Non-Authoritative Information
다른 소스에서 수신된 정보를 제공하고 있다.
204 No Content
처리했지만 콘텐츠를 제공하지 않는다.
205 Reset Content
문서 보기를 재설정할 것을 요구한다
206 Partial Content
일부만 성공적으로 처리했다.
Successful 2xx
300 Multiple Choices
서버가 사용자 에이전트에 따라 수행할 작업을 선택하거나
요청자가 선택할 수 있는 작업 목록을 제공한다.
301 Moved Permanently
GET 또는 HEAD 요청에 대한 응답으로
이 응답을 표시하면 요청자가 자동으로 새 위치로 전달된다
302 Found
요청자는 향후 요청 시 원래 위치를 계속 사용해야 한다.
304 Not Modified
마지막 요청 이후 요청한 페이지는 수정되지 않았다.
307 Temporary Redirect
현재 서버가 다른 위치의 페이지로 요청에
응답하고 있지만 요청자는 향후 요청 시
원래 위치를 계속 사용해야 한다.
Redirection 3xx
400 Bad Request
서버가 요청의 구문을 인식하지 못했다.
401 Unauthorized
서버는 로그인이 필요한 페이지에
대해 이 요청을 제공할 수 있다.
404 Not Found
서버가 요청한 페이지를 찾을 수 없다.
405 Method Not Allowed
요청에 지정된 방법을 사용할 수 없다.
408 Request Timeout
서버의 요청 대기가 시간을 초과하였다.
413 Request Entity Too Large
요청이 너무 커서 서버가 처리할 수 없다.
Client Error 4xx
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 프로토콜 버전을 지원하지 않는다.
Headers
HTTP
Accept
Accept-Charset
Accept-Features
Accept-Encoding
Accept-Language
Accept-Ranges
Access-Control-Allow-Credentials
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers
Access-Control-Max-Age
Access-Control-Expose-Headers
Access-Control-Request-Method
Access-Control-Request-Headers
If-None-Match
If-Range
If-Unmodified-Since
Last-Event-ID
Last-Modified
Link
Location
Max-Forwards
Negotiate
Origin
Pragma
Proxy-Authenticate
Proxy-Authorization
Range
Referer
Retry-After
Sec-Websocket-Extensions
Sec-Websocket-Key
Sec-Websocket-Origin
Sec-Websocket-Protocol
Sec-Websocket-Version
Server
Set-Cookie
Set-Cookie2
Strict-Transport-Security
TCN
TE
Transfer-Encoding
Upgrade
User-Agent
Variant-Vary
Vary
Via
Warning
WWW-Authenticate
X-Content-Duration
X-Content-Security-Policy
X-DNSPrefetch-Control
X-Frame-Options
X-Requested-With
Age
Allow
Alternates
Authorization
Cache-Control
Connection
Content-Encoding
Content-Language
Content-Length
Content-Location
Content-MD5
Content-Range
Content-Security-Policy
Content-Type
Cookie
Date
ETag
Expect
Expires
From
Host
If-Match
If-Modified-Since
Accept-Charset
Accept-Features
Accept-Encoding
Accept-Language
Accept-Ranges
Access-Control-Allow-Credentials
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers
Access-Control-Max-Age
Access-Control-Expose-Headers
Access-Control-Request-Method
Access-Control-Request-Headers
If-None-Match
If-Range
If-Unmodified-Since
Last-Event-ID
Last-Modified
Link
Location
Max-Forwards
Negotiate
Origin
Pragma
Proxy-Authenticate
Proxy-Authorization
Range
Referer
Retry-After
Sec-Websocket-Extensions
Sec-Websocket-Key
Sec-Websocket-Origin
Sec-Websocket-Protocol
Sec-Websocket-Version
Server
Set-Cookie
Set-Cookie2
Strict-Transport-Security
TCN
TE
Transfer-Encoding
Upgrade
User-Agent
Variant-Vary
Vary
Via
Warning
WWW-Authenticate
X-Content-Duration
X-Content-Security-Policy
X-DNSPrefetch-Control
X-Frame-Options
X-Requested-With
Age
Allow
Alternates
Authorization
Cache-Control
Connection
Content-Encoding
Content-Language
Content-Length
Content-Location
Content-MD5
Content-Range
Content-Security-Policy
Content-Type
Cookie
Date
ETag
Expect
Expires
From
Host
If-Match
If-Modified-Since
Accept
Accept-Charset
Accept-Encoding
Accept-Language
Accept-Ranges
Last-Modified
Location
Origin
Pragma
Range
Referer
Server
Set-Cookie
Transfer-Encoding
User-Agent
WWW-Authenticate
X-Content-Security-Policy
X-Frame-Options
X-Requested-With Cache-Control
Content-Encoding
Content-Language
ETag
Expires
Host
Content-Length
Content-Range
Content-Type
Cookie
Date
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 : 서버의 시간을 제공
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
클라이언트가 서버에게 받을 수 있는 파일의 형식 정의
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
format;q=0.9
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
format;quality=0.9
from 0.0 to 1.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
MIME TYPE
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
MIME TYPE
전자우편은 7비트 ASCII 문자를 사용하여 전송되기 때문에,
8비트 이상의 코드를 사용하는 문자나 이진 파일들은
MIME 포맷으로 변환되어 SMTP로 전송된다.
Accept-Charset: iso-8859-5, unicode-1-1;q=0.8
ASCII, EUC-KR, EUC-JP, CP949, UTF-8…etc
Content-Type: text/html; charset=utf-8
서버가 클라이언트에게 보내는 내용의 type을 알려줌
Accept-Encoding: gzip, deflate, sdch
Accept-Encoding: gzip, deflate, sdch
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
Content-Encoding: gzip
서버가 클라이언트에게 보내는 내용의 압축방식을 알려줌
Accept-Language
클라이언트가 서버에게 받을 수 있는 언어의 종류를 보냄
Accept-Language
ISO 639-1 Code
Accept-Language
ISO 639-1 Code
2글자로 나타낸 언어코드
ko, en, ja, zh…
Accept-Language
ISO 639-1 Code
2글자로 나타낸 언어코드
ko-kr, en-us, en-gb, ja-jp, zh-cn, zh-tw…
Accept-Language: ko-kr,ko;q=0.8,en-us;q=0.5,en;q=0.3
Content-Language: ko-kr
서버가 클라이언트에게 보내는 내용의 언어를 알려줌
Content-Length: 23021
서버가 클라이언트에게 보내는 내용의 크기를 바이트 단위로 알려줌
User-Agent
User-Agent
클라이언트가 서버에게 보내는 브라우저의 정보를 알려줌
Netscape
Mozilla/2.02Gold (Win95; I)
Mozilla/2.02Gold (Win95; I)
????
Mozilla/2.02Gold (Win95; I)
Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)
Mozilla/2.02Gold (Win95; I)
Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)
????
Mozilla/2.02Gold (Win95; I)
Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)
osh; U; PPC Mac OS X; en) AppleWebKit/312.8.1 (KHTML, like G
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
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
????
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
Cookie
서버와 클라이언트 간의 데이터를 저장해둠
Cookie
luavis
luavis
Cookie: user=luavis; grade=2;
클라이언트가 서버에게 쿠키값을 알려줌
Set-Cookie: lu=Rg3vHJZnehYLjVg7qi3bZjzg; Expires=Tue, 15-Jan-2013 2
Set-Cookie: made_write_conn=1295214458; Path=/; Domain=.example.co
Set-Cookie: reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GM
서버가 클라이언트에게 쿠키값을 설정하라 지시
Set-Cookie: lu=Rg3vHJZnehYLjVg7qi3bZjzg; Expires=Tue, 15-Jan-2013 2
Set-Cookie: made_write_conn=1295214458; Path=/; Domain=.example.co
Set-Cookie: reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GM
Set-Cookie: lu=Rg3vHJZnehYLjVg7qi3bZjzg; Expires=Tue, 15-Jan-2013 2
Set-Cookie: made_write_conn=1295214458; Path=/; Domain=.example.co
Set-Cookie: reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GM
Set-Cookie: lu=Rg3vHJZnehYLjVg7qi3bZjzg; Expires=Tue, 15-Jan-2013 2
Set-Cookie: made_write_conn=1295214458; Path=/; Domain=.example.co
Set-Cookie: reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GM
Persistent cookie
Set-Cookie: lu=Rg3vHJZnehYLjVg7qi3bZjzg; Expires=Tue, 15-Jan-2013 2
Set-Cookie: made_write_conn=1295214458; Path=/; Domain=.example.co
Set-Cookie: reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GM
Set-Cookie: lu=Rg3vHJZnehYLjVg7qi3bZjzg; Expires=Tue, 15-Jan-2013 2
Set-Cookie: made_write_conn=1295214458; Path=/; Domain=.example.co
Set-Cookie: reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GM
Keep-Alive
Keep-Alive
default HTTP when keep alive
HTTP 1.1
HTTP 1.0
Connection: Keep-Alive <not official>
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Cache
Cache
종 도큐먼트들의 지속적인 요청을 피하기 위해 클라이언트에 임시저
For example…
For example…
왠만한 일 아니면 바뀔일이 없음
Cache-Control: public, max-age=3600, must-revalidate
Cache-Control: no-cache
HTTP 1.1
HTTP 1.0
Expire: Thu, 01 Dec 1983 20:00:00 GMT
Pragma: cache
Pragma: no-cache
- Request headerHTTP 1.1
General-header
Request-header
Entity-Header
- Request headerHTTP 1.1
Cache control
Check modified
- Request headerHTTP 1.1
General-header
Cahce-Control max-age=sec
sec보다 오래된 데이터는 캐시하지 않음
- Request headerHTTP 1.1
General-header
Cahce-Control max-age=0
End-to-End revalidation
모든 프록시에 대해 재검증 요청
- Request headerHTTP 1.1
Check modified
If-Match
If-None-Match
해당 e-tag가 있어야 진행이 됨
해당 e-tag가 존재하지 않아야 진행
- 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.
- 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
- 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
If-Modified-Since: <date>
- Request headerHTTP 1.1
Check modified
해당 날짜로 부터 변경 사항이 있는가 확인
- Response headerHTTP 1.1
Cache control
Checksum header
- Response headerHTTP 1.1
Cache control
Cache-Control: public, max-age=3600, must-revalidate
Cache-Control: no-store
Cache-Control: no-cache
- Response headerHTTP 1.1
Cache control
Cache-Control: public, max-age=3600, must-revalidate
proxy-revalidateprivate
수명 재확인
Proxy
Server Client
cached cached
- Response headerHTTP 1.1
Cache control In public
Proxy
Server Client
not-cached cached
In private
- Response headerHTTP 1.1
Cache control
- Response headerHTTP 1.1
Checksum header
E-tag
Last-Modified
Expires
Data 고유의 entity tag
최종 수정일
수명
Google image resources
Google image resources
WHAT??
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
CDN
work like proxy
IF…. optical fiber
IF…. optical fiber
1 sec = 7.5 revolution
for half rev = 66ms
CDN
work like proxy
Cookie
Keep-alive
Cache
Accept
Content control
User-agent
2
HTTP
- 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
HTTP
In 1998 google
In now time google
엄청난 진보
= 전체 페이지 사이즈 증
훨씬 더 많은 리소스로 구성되어 있다.
다수의 도메인을 사용한다.
과거에 비해 매우 동적으로 동작한다.
보안이 보다 중요한 이슈가 되었다.
헤더의 길이가 길어졌다.
훨씬 더 많은 리소스로 구성되어 있다.
다수의 도메인을 사용한다.
과거에 비해 매우 동적으로 동작한다.
보안이 보다 중요한 이슈가 되었다.
헤더의 길이가 길어졌다.
Layers
Layers
항상 TLS 위에서 동작
HTTP 헤더 압축
바이너리 프로토콜
Multiplexing
웹 사이트를 재작성할 필요 없음
Server Push
항상 TLS 위에서 동작
TLS(SSL)의 기본 탑재
서버 보안의 중요성 증가
HTTP 헤더 압축
기존 encoding: gzip은 압축은
startline과 header는 압축을 안함.
Cookie와 User-agent의 길이 증가, 같은 헤더의 지속적 요청..
요즘 웹의 실태
바이너리 프로토콜
패킷의 사이즈를 줄일 수 있음.
Multiplexing
Server Push
HTTPS 대비
55%
기존에 비해 효율
HTTP/2
HTTP 프로토콜의 두 번째 버전
SPDY에 기반하고 있으며,
국제 인터넷 표준화 기구(IETF)에서 개발되고 있다.
HTTP/2
Spdy HTTP/2
TLS(SSL) Required. SSL Not Required.
Fast Encrypted
Connections.
​Faster Encrypted
Connections.
Single-Host
Multiplexing.
​Multi-Host Multiplexing.
​Compression.
Faster, More Secure
Compression.
​Prioritization. Improved Prioritization.
The HTTP/2 specification was published as RFC 7540
in 14 May 2015.
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)
References http://nuli.navercorp.com/sharing/blog/post/1132452
https://www.maxcdn.com/blog/spdy-http2-shift/
http://cacm.acm.org/magazines/2012/12/157870-spdying-up-the-web/abstract
http://www.slideshare.net/oddpoet/spdy-13231459
http://helloworld.naver.com/
http://www.w3.org/
http://wikipedia.org/
http://wpcertification.blogspot.kr/2010/07/difference-between-no-cache-and-no.html
http://icecreamie.tistory.com/52
http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/
Thanks!
감사합니다!
ありがとう!
QnA?
谢谢!

More Related Content

What's hot

Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
wanangwa234
 

What's hot (20)

Http protocol
Http protocolHttp protocol
Http protocol
 
HTTP Presentation
HTTP Presentation HTTP Presentation
HTTP Presentation
 
HTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeHTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status Code
 
HTTP
HTTPHTTP
HTTP
 
Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Hypertext transfer protocol (http)
Hypertext transfer protocol (http)
 
Http
HttpHttp
Http
 
Introduction to HTTP protocol
Introduction to HTTP protocolIntroduction to HTTP protocol
Introduction to HTTP protocol
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 
Basics of HTTP - Nafis Fuad
Basics of HTTP - Nafis FuadBasics of HTTP - Nafis Fuad
Basics of HTTP - Nafis Fuad
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response Structure
 
HTTP Protocol Basic
HTTP Protocol BasicHTTP Protocol Basic
HTTP Protocol Basic
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Dns server
Dns serverDns server
Dns server
 
Http methods
Http methodsHttp methods
Http methods
 
HTTP & HTTPS
HTTP & HTTPSHTTP & HTTPS
HTTP & HTTPS
 
Web server
Web serverWeb server
Web server
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
 

Viewers also liked

Metin izet kllapia e tesavufit
Metin izet   kllapia e tesavufitMetin izet   kllapia e tesavufit
Metin izet kllapia e tesavufit
Libra Islame
 
캐나다 항공일주 여행안내
캐나다 항공일주 여행안내캐나다 항공일주 여행안내
캐나다 항공일주 여행안내
Mal-Yong Yoon
 
로봇청소기 수정
로봇청소기 수정로봇청소기 수정
로봇청소기 수정
moonjiye
 

Viewers also liked (20)

Http 헤더
Http 헤더Http 헤더
Http 헤더
 
HTTP 발표자료 - 김연수
HTTP 발표자료 - 김연수HTTP 발표자료 - 김연수
HTTP 발표자료 - 김연수
 
Metin izet kllapia e tesavufit
Metin izet   kllapia e tesavufitMetin izet   kllapia e tesavufit
Metin izet kllapia e tesavufit
 
캐나다 항공일주 여행안내
캐나다 항공일주 여행안내캐나다 항공일주 여행안내
캐나다 항공일주 여행안내
 
읿본 도쿄여행 소개자료
읿본 도쿄여행 소개자료읿본 도쿄여행 소개자료
읿본 도쿄여행 소개자료
 
Web http spec(basic)
Web http spec(basic)Web http spec(basic)
Web http spec(basic)
 
Web http spec
Web http specWeb http spec
Web http spec
 
Akamai Korea - Tech Day (2015/03/11) DNS
Akamai Korea - Tech Day (2015/03/11) DNSAkamai Korea - Tech Day (2015/03/11) DNS
Akamai Korea - Tech Day (2015/03/11) DNS
 
온라인세미나: 처음 만나는 RAD Studio XE8
온라인세미나: 처음 만나는 RAD Studio XE8온라인세미나: 처음 만나는 RAD Studio XE8
온라인세미나: 처음 만나는 RAD Studio XE8
 
삼성 스마트Tv 제일기획
삼성 스마트Tv 제일기획삼성 스마트Tv 제일기획
삼성 스마트Tv 제일기획
 
Beyond screen, New experience
Beyond screen, New experienceBeyond screen, New experience
Beyond screen, New experience
 
Android Wear Development
Android Wear DevelopmentAndroid Wear Development
Android Wear Development
 
로봇청소기 수정
로봇청소기 수정로봇청소기 수정
로봇청소기 수정
 
센서와 액츄에이터
센서와 액츄에이터센서와 액츄에이터
센서와 액츄에이터
 
130723 robot
130723 robot130723 robot
130723 robot
 
소프트웨어 개발 Workflow for Team
소프트웨어 개발 Workflow for Team소프트웨어 개발 Workflow for Team
소프트웨어 개발 Workflow for Team
 
앱을 위한 아이디어 2015
앱을 위한 아이디어 2015 앱을 위한 아이디어 2015
앱을 위한 아이디어 2015
 
Android wear개발 따라잡기
Android wear개발 따라잡기Android wear개발 따라잡기
Android wear개발 따라잡기
 
스마트폰 카테고리별 앱 추천 리스트 - 안드로이드, iOS 중심으로
스마트폰 카테고리별 앱 추천 리스트 - 안드로이드, iOS 중심으로스마트폰 카테고리별 앱 추천 리스트 - 안드로이드, iOS 중심으로
스마트폰 카테고리별 앱 추천 리스트 - 안드로이드, iOS 중심으로
 
VR AR 미래전략 2016
VR AR 미래전략 2016VR AR 미래전략 2016
VR AR 미래전략 2016
 

Similar to Http

HTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive ListHTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive List
Mainstreethost
 

Similar to Http (20)

RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HP
 
HTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive ListHTTP Status Codes Cheat Sheet: An Exhaustive List
HTTP Status Codes Cheat Sheet: An Exhaustive List
 
BITM3730Week9(1).pptx
BITM3730Week9(1).pptxBITM3730Week9(1).pptx
BITM3730Week9(1).pptx
 
WebApp #3 : API
WebApp #3 : APIWebApp #3 : API
WebApp #3 : API
 
REST 101: An Overview To Representational State Transfer.
REST 101: An Overview To Representational State Transfer.REST 101: An Overview To Representational State Transfer.
REST 101: An Overview To Representational State Transfer.
 
HTTPs Strict Transport Security
HTTPs    Strict Transport Security HTTPs    Strict Transport Security
HTTPs Strict Transport Security
 
Web technology Unit-I Part D - message format
Web technology Unit-I  Part D - message formatWeb technology Unit-I  Part D - message format
Web technology Unit-I Part D - message format
 
BITM3730 11-1.pptx
BITM3730 11-1.pptxBITM3730 11-1.pptx
BITM3730 11-1.pptx
 
BITM3730 Networking.pdf
BITM3730 Networking.pdfBITM3730 Networking.pdf
BITM3730 Networking.pdf
 
The Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile AppThe Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile App
 
Rest Webservice
Rest WebserviceRest Webservice
Rest Webservice
 
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML Resources
 
REST library.pptx
REST library.pptxREST library.pptx
REST library.pptx
 
HTTP_2.ppt
HTTP_2.pptHTTP_2.ppt
HTTP_2.ppt
 
HTTP.ppt
HTTP.pptHTTP.ppt
HTTP.ppt
 
HTTP.ppt
HTTP.pptHTTP.ppt
HTTP.ppt
 
ReST
ReSTReST
ReST
 
6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework6 Months Industrial Training in Spring Framework
6 Months Industrial Training in Spring Framework
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
 
Getting started with DSpace 7 REST API
Getting started with DSpace 7 REST APIGetting started with DSpace 7 REST API
Getting started with DSpace 7 REST API
 

More from Luavis Kang (6)

[SWMaestro 100+ 발표자료] 테스트하기
[SWMaestro 100+ 발표자료] 테스트하기[SWMaestro 100+ 발표자료] 테스트하기
[SWMaestro 100+ 발표자료] 테스트하기
 
Linux containers
Linux containersLinux containers
Linux containers
 
Shellscript에 대하여
Shellscript에 대하여Shellscript에 대하여
Shellscript에 대하여
 
GDG Dev camp 발표자료 - python으로 만들어보는 http서버
GDG Dev camp 발표자료 - python으로 만들어보는 http서버GDG Dev camp 발표자료 - python으로 만들어보는 http서버
GDG Dev camp 발표자료 - python으로 만들어보는 http서버
 
Git
GitGit
Git
 
Llvm
LlvmLlvm
Llvm
 

Recently uploaded

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Recently uploaded (20)

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 

Http