Home ๐ŸŒ [Network] TCP/IP Model - Appplication Layer ๐ŸŒ
Post
Cancel

๐ŸŒ [Network] TCP/IP Model - Appplication Layer ๐ŸŒ

๐ŸŒ URI

URI(Uniform Resource Identifier)๋ž€ ์ž์›์„ ์‹๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š” ์ •๋ณด๋ฅผ ๋งํ•ฉ๋‹ˆ๋‹ค.

URI๋Š” ์‹๋ณ„์— ์‚ฌ์šฉ๋˜๋Š” ์ •๋ณด์— ๋”ฐ๋ผ ์œ„์น˜ ๊ธฐ๋ฐ˜ ์‹๋ณ„์ž์ธ URL(Uniform Resource Locator)๊ณผ ์ด๋ฆ„ ๊ธฐ๋ฐ˜ ์‹๋ณ„์ž์ธ URN(Uniform Resource Name)์œผ๋กœ ๋‚˜๋ˆ„์–ด์ง‘๋‹ˆ๋‹ค.

์ž์›(Resource)

  • ๋„คํŠธ์›Œํฌ ์ƒ์˜ ๋ฉ”์„ธ์ง€๋ฅผ ํ†ตํ•ด ์ฃผ๊ณ  ๋ฐ›๋Š” ๋Œ€์ƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
  • ์˜ค๋Š˜๋‚  ์ธํ„ฐ๋„ท ํ™˜๊ฒฝ์„ ์ด๋ฃจ๋Š” ๋Œ€๋ถ€๋ถ„์˜ ํ†ต์‹ ์€ HTTP๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ด๋ฃจ์–ด์ง€๋ฏ€๋กœ HTTP ์š”์ฒญ ๋ฉ”์„ธ์ง€์˜ ๋Œ€์ƒ์„ ์˜๋ฏธํ•˜๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค.

๐ŸŒ URL

URL์˜ ํ‘œ๊ธฐ ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

URL ๊ตฌ์„ฑ์š”์†Œ์ •์˜์‚ฌ์šฉ
Scheme์ž์›์— ์ ‘๊ทผํ•˜๋Š” ๋ฐฉ๋ฒ•์ผ๋ฐ˜์ ์œผ๋กœ ๊ฐ€์šฉํ•  Protocol์ด ๋ช…์‹œ
AuthorityHost๋ฅผ ํŠน์ •ํ•  ์ˆ˜ ์žˆ๋Š” ์ •๋ณดIP Address ํ˜น์€ Domain Name
Path์ž์›์ด ์œ„์น˜ํ•œ ๊ฒฝ๋กœ/๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๊ณ„์ธต์ ์œผ๋กœ ํ‘œํ˜„
QueryQuery String(Query Parameter)๋ฅผ ์ด์šฉํ•ด ๋” ์ž์„ธํžˆ ์ž์›์„ ์š”์ฒญโ€ข ?๋กœ ์‹œ์ž‘
โ€ข key = valueํ˜•ํƒœ์ด๋ฉฐ &๋กœ ์—ฐ๊ฒฐ
Fragment์ž์›์˜ ํ•œ ์กฐ๊ฐ์„ ๊ฐ€๋ฆฌํ‚ค๊ธฐ ์œ„ํ•œ ์ •๋ณดํ”ํžˆ HTML๊ณผ ๊ฐ™์€ ์ž์›์—์„œ ํŠน์ • ๋ถ€๋ถ„์„ ๊ฐ€๋ฆฌํ‚ค๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ

๐ŸŒ URN

URL์˜ ๊ฐ€์žฅ ํฐ ๋ฌธ์ œ์ ์€ ์ž์›์˜ ์œ„์น˜๊ฐ€ ๋ณ€ํ•œ๋‹ค๋ฉด ๋” ์ด์ƒ ์œ ์š”ํ•˜์ง€ ์•Š๋‹ค๋Š” ์ ์ž…๋‹ˆ๋‹ค.

๊ทธ๋Ÿฌ๋‚˜ URN์€ ์ž์›์— ๊ณ ์œ ํ•œ ์ด๋ฆ„์„ ๋ถ™์ด๋Š” ์ด๋ฆ„ ๊ธฐ๋ฐ˜ ์‹๋ณ„์ž์ด๊ธฐ์— ์ž์›์˜ ์œ„์น˜์™€ ๋ฌด๊ด€ํ•˜๊ฒŒ ์ž์›์„ ์‹๋ณ„ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์žฅ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค๋งŒ ์•„์ง ๋„๋ฆฌ ์ฑ„ํƒ๋œ ๋ฐฉ์‹์€ ์•„๋‹™๋‹ˆ๋‹ค.

๐ŸŒ Domain

๋„คํŠธ์›Œํฌ ์ƒ์˜ ์–ด๋–ค Host๋ฅผ ํŠน์ •ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” IP Address๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ํ†ต์‹ ํ•˜๊ณ ์ž ํ•˜๋Š” ๋ชจ๋“  Host์˜ IP ์ฃผ์†Œ๋ฅผ ๊ธฐ์–ตํ•˜๊ณ  ์žˆ๊ธฐ๋Š” ์–ด๋ ต๊ธฐ ๋•Œ๋ฌธ์— ์ผ๋ฐ˜์ ์œผ๋กœ IP Address๋ณด๋‹ค๋Š” Domain Name์„ ๋” ๋งŽ์ด ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

Name Server์—์„œ IP Address์™€ Domain Name์„ ๊ด€๋ฆฌํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— Name Server์— Domain Name์„ ๋ฌผ์–ด๋ณด๋ฉด ํ•ด๋‹น Domain Name์— ๋Œ€ํ•œ IP Address๋ฅผ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.

Domain Name๊ณผ IP Address๋ฅผ ๋Œ€์‘์‹œํ‚ค๋Š” ๊ฒƒ์€ IP Address๊ฐ€ ๋ฐ”๋€Œ๋”๋ผ๋„ ๋ฐ”๋€ IP Address์— Domain Name์„ ๋‹ค์‹œ ๋Œ€์‘์‹œํ‚ค๋ฉด ๋˜๋ฏ€๋กœ IP Address๋งŒ์œผ๋กœ Host๋ฅผ ํŠน์ •ํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค ๋” ๊ฐ„ํŽธํ•ฉ๋‹ˆ๋‹ค.

๐ŸŒ Domain Name

Domain Name์€ .์„ ๊ธฐ์ค€์œผ๋กœ ๋‹ค์Œ ์ด๋ฏธ์ง€์™€ ๊ฐ™์ด ๊ณ„์ธต์ ์œผ๋กœ ๋ถ„๋ฅ˜๋ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ www.naver.com๊ณผ ๊ฐ™์ด Domain Name์„ ๋ชจ๋‘ ํฌํ•จํ•˜๋Š” ๊ฒƒ์„ FQDN(Fully-Qualified Domain Name)์ด๋ผ ํ•˜๋ฉฐ Host Name์ด๋ผ ๋ถ€๋ฅด๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค.

๐ŸŒ DNS(Domain Name System)

DNS๋Š” ๊ณ„์ธต์ ์ธ Domain Name์— ๋Œ€ํ•œ ๊ด€๋ฆฌ ์ฒด๊ณ„์ด์ž ์ด๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํ”„๋กœํ† ์ฝœ์ž…๋‹ˆ๋‹ค.

Resolving ๊ณผ์ •์—์„œ ๋‹ค์–‘ํ•œ Name Server๋“ค์ด ์‚ฌ์šฉ๋˜๋Š”๋ฐ, ์ค‘์š”ํ•œ ์—ญํ• ์„ ๋‹ด๋‹นํ•˜๋Š” 4๊ฐœ์˜ Name Server๋ฅผ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

Name Server์„ค๋ช…
Local Name Server(Local DNS Server, Resolver)โ€ข Client์™€ ๋งž๋‹ฟ์•„ ์žˆ๋Š” Name Server
โ€ข Client๊ฐ€ Domain Name์„ ํ†ตํ•ด IP Address๋ฅผ ์•Œ์•„๋‚ด๊ณ ์ž ํ•  ๋•Œ ๊ฐ€์žฅ ๋จผ์ € ์ฐพ๊ฒŒ ๋˜๋Š” Name Server
Local Name Server์˜ ์ฃผ์†Œ๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ISP(Internet Service Provider)์—์„œ ํ• ๋‹น
โ€ข Public DNS Server๋กœ ๋Œ€์ฒดํ•  ์ˆ˜ ์žˆ์Œ
Root Name Server(Root DNS Server)โ€ข Root Domain์„ ๊ด€์žฅํ•˜๋Š” Name Server
โ€ข Local Name Server๊ฐ€ Domain Name๊ณผ ๋Œ€์‘๋˜๋Š” IP Address๋ฅผ ๋ชจ๋ฅด๋Š” ๊ฒฝ์šฐ TLD Name Server์˜ IP Address๋ฅผ ๋ฐ˜ํ™˜
TLD Name Server(TLD Server)โ€ข TLD(Top-Level Domain)๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” Name Server
โ€ข TLD์˜ ํ•˜์œ„ Domain Name์„ ๊ด€๋ฆฌํ•˜๋Š” Name Server์˜ IP Address๋ฅผ ๋ฐ˜ํ™˜
Authoritative Name Serverโ€ข ํŠน์ • Domain Zone์„ ๊ด€๋ฆฌํ•˜๋Š” Name Server๋กœ, ์ž์‹ ์ด ๊ด€๋ฆฌํ•˜๋Š” Domain Zone์— ๋Œ€ํ•ด์„œ๋Š” ๋‹ค๋ฅธ Name Server์—๊ฒŒ ๋– ๋„˜๊ธฐ์ง€ ์•Š๊ณ  ๊ณง๋ฐ”๋กœ ๋‹ตํ•  ์ˆ˜ ์žˆ๋Š” Server
โ€ข Local Name Server๊ฐ€ ๋งˆ์ง€๋ง‰์œผ๋กœ ์งˆ์˜ํ•˜๋Š” Name Server

Resolving: IP Address๋ฅผ ๋ชจ๋ฅด๋Š” ์ƒํƒœ์—์„œ Domain Name์— ๋Œ€์‘๋˜๋Š” IP Address๋ฅผ ์•Œ์•„๋‚ด๋Š” ๊ณผ์ •

๐ŸŒ Resolving

Recursive Query / Iterative Query

Resolving ๊ณผ์ •์—์„œ Local Name Server๊ฐ€ ๋‹ค๋ฅธ Name Server๋“ค์—๊ฒŒ ์งˆ์˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์—๋Š” ํฌ๊ฒŒ Recursive Query์™€ Iterative Query๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๋Ÿฌ๋‚˜ ์—ฌ๋Ÿฌ ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์น˜๋Š” Resolving ๊ณผ์ •์„ ๋ฐ˜๋ณต์ ์œผ๋กœ ์—ฌ๋Ÿฌ Client๊ฐ€ ์งˆ์˜ํ•  ๊ฒฝ์šฐ Name Server์— ๊ณผ๋ถ€ํ•˜๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— DNA Cache๋ฅผ ํ™œ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ด๋•Œ DNA Cache์— ์ €์žฅ๋œ ๊ฐ’์€ TTL(Time To Live)๋™์•ˆ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค.

๐ŸŒ Protocol

๐ŸŒ HTTP(Hyper Text Transfer Protocol)

๐ŸŒ HTTP Version

HTTP์˜ ๋ฐœ์ „ํ•ด์˜จ Version์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

HTTP / Version์„ค๋ช…
HTTP / $0.9$โ€ข ๊ฑฐ์˜ ์‚ฌ์šฉ๋˜์ง€ ์•Š๋Š” ์ดˆ์ฐฝ๊ธฐ HTTP Version
โ€ข ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ฉ”์„œ๋“œ๊ฐ€ GET ๋ฟ
โ€ข ์š”์ฒญ ๋ฉ”์„ธ์ง€๋Š” ํ•œ ์ค„๋กœ ๊ตฌ์„ฑ
โ€ข Header๊ฐ€ ์ง€์›๋˜์ง€ ์•Š์Œ
HTTP / $1.0$โ€ข HEAD, POST์™€ ๊ฐ™์€ GET์ด์™ธ์˜ ๋ฉ”์„œ๋“œ๊ฐ€ ๋„์ž…
โ€ข Header ์ง€์›
โ€ข ๋น„์ง€์† ์—ฐ๊ฒฐ
HTTP / $1.1$โ€ข ์ง€์† ์—ฐ๊ฒฐ
โ€ข Pipelining ๊ธฐ๋Šฅ ์ถ”๊ฐ€
HTTP / $2.0$โ€ข ์†ก์ˆ˜์‹  ํšจ์œจ์„ ๋†’์ด๊ธฐ ์œ„ํ•ด Header๋ฅผ ์••์ถ•ํ•˜์—ฌ ์ „์†ก(Text ๊ธฐ๋ฐ˜์˜ ๋ฉ”์„ธ์ง€ โžœ Binary ๊ธฐ๋ฐ˜์˜ ๋ฉ”์„ธ์ง€)
โ€ข Server Push ๊ธฐ๋Šฅ ์ถ”๊ฐ€
โ€ข Multiplexing ๊ธฐ๋Šฅ ์ถ”๊ฐ€
HTTP / $3.0$UDP๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌํ˜„๋œ QUIC(Quick UDP Internet Connections) ํ”„๋กœํ† ์ฝœ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋™์ž‘
  • Pipelining: ํŠน์ • ์š”์ฒญ์— ๋Œ€ํ•œ ์‘๋‹ต์ด ์ˆ˜์‹ ๋˜๊ธฐ ์ „์— ๋‹ค์Œ ์š”์ฒญ์„ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ
  • Server Push: Client๊ฐ€ ์š”์ฒญํ•˜์ง€ ์•Š์•˜๋”๋ผ๋„ ๋ฏธ๋ž˜์— ํ•„์š”ํ•  ๊ฒƒ์œผ๋กœ ์˜ˆ์ƒ๋˜๋Š” ์ž์›์„ ๋ฏธ๋ฆฌ ์ „์†กํ•ด์ฃผ๋Š” ๊ธฐ๋Šฅ
  • Multiplexing
    • ์—ฌ๋Ÿฌ Stream์„ ์ด์šฉํ•ด ๋ณ‘๋ ฌ์ ์œผ๋กœ ๋ฉ”์„ธ์ง€๋ฅผ ์ฃผ๊ณ ๋ฐ›๋Š” ๊ธฐ์ˆ 
    • HOL(Hot-Of-Line) Blocking ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐ
    • ์—ฌ๋Ÿฌ ๊ฐœ์˜ Stream๋ณ„๋กœ ๋…๋ฆฝ์ ์ธ ์†ก์ˆ˜์‹ ์ด ๊ฐ€๋Šฅํ•˜๋ฉฐ Stream๋ณ„ ๋ฉ”์„ธ์ง€๋“ค์€ ์ผ์ •ํ•œ ์ˆœ์„œ๋ฅผ ์œ ์ง€ํ•  ํ•„์š”๊ฐ€ ์—†์Œ
  • HOL(Hot-Of-Line) Blocking
    • HTTP / $1.1$๊นŒ์ง€ ๊ณ ์งˆ์ ์ธ ๋ฌธ์ œ
    • ๊ฐ™์€ ํ์— ๋Œ€๊ธฐํ•˜๋ฉฐ ์ˆœ์ฐจ์ ์œผ๋กœ ์ฒ˜๋ฆฌ๋˜๋Š” ์—ฌ๋Ÿฌ ๋ฐ์ดํ„ฐ๊ฐ€ ์žˆ์„ ๋•Œ, ์ฒซ ๋ฒˆ์งธ ๋ฐ์ดํ„ฐ์˜ ์ฒ˜๋ฆฌ ์ง€์—ฐ์œผ๋กœ ์ธํ•ด ๋‚˜๋จธ์ง€ ๋ฐ์ดํ„ฐ๋“ค์˜ ์ฒ˜๋ฆฌ๋„ ๋ชจ๋‘ ์ง€์—ฐ๋˜๋Š” ๋ฌธ์ œ

๐ŸŒ HTTP ํŠน์ง•

HTTP์˜ ํŠน์ง•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

HTTP ํŠน์ง•์„ค๋ช…
์š”์ฒญ - ์‘๋‹ต ๊ธฐ๋ฐ˜Client์™€ Server๊ฐ€ ์„œ๋กœ HTTP ์š”์ฒญ ๋ฉ”์„ธ์ง€์™€ HTTP ์‘๋‹ต ๋ฉ”์„ธ์ง€๋ฅผ ์ฃผ๊ณ  ๋ฐ›๋Š” ๊ตฌ์กฐ๋กœ ๋™์ž‘
๋ฏธ๋””์–ด ๋…๋ฆฝโ€ข HTTP๋Š” ์ฃผ๊ณ ๋ฐ›์„ ์ž์›์˜ ํŠน์ •๊ณผ ๋ฌด๊ด€ํ•˜๊ฒŒ ๊ทธ์ € ์ฃผ๊ณ ๋ฐ›์„ ์ˆ˜๋‹จ(Interface)์˜ ์—ญํ• ๋งŒ์„ ์ˆ˜ํ–‰
โ€ข MIME Type
Statelessโ€ข Client์˜ ๋ชจ๋“  HTTP ์š”์ฒญ์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ๋…๋ฆฝ์ ์ธ ์š”์ฒญ์œผ๋กœ ๊ฐ„์ฃผ
โ€ข Stateless๋ฅผ ๋ณด์™„ํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ์ˆ : Cookie
์ง€์† ์—ฐ๊ฒฐโ€ข HTTP๋Š” ๋น„์—ฐ๊ฒฐํ˜• ํ”„๋กœํ† ์ฝœ์ด์ง€๋งŒ ๊ธฐ๋ณธ์ ์œผ๋กœ TCP ์ƒ์—์„œ ๋™์ž‘
โ€ข HTTP 1.0 ์ดํ•˜๋Š” ๋น„์ง€์† ์—ฐ๊ฒฐ / HTTP 1.1 ์ด์ƒ์€ ์ง€์† ์—ฐ๊ฒฐ
ํ™•์žฅ์„ฑ(Scalability)HTTP์˜ ์ค‘์š” ์„ค๊ณ„ ๋ชฉํ‘œ๋กœ ์–ธ์ œ๋“  ์‰ฝ๊ฒŒ Server๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Œ์„ ๋œปํ•จ
๊ฒฌ๊ณ ์„ฑ(Robustness)HTTP์˜ ์ค‘์š” ์„ค๊ณ„ ๋ชฉํ‘œ๋กœ Server ์ค‘ ํ•˜๋‚˜์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒจ๋„ ์‰ฝ๊ฒŒ ๋‹ค๋ฅธ Server๋กœ ๋Œ€์ฒด๊ฐ€ ๊ฐ€๋Šฅํ•จ์„ ๋œปํ•จ
  • MIME Type(Multipurpose Internet Mail Extensions Type): HTTP์—์„œ ๋ฉ”์„ธ์ง€๋กœ ์ฃผ๊ณ ๋ฐ›๋Š” ์ž์›์˜ ์ข…๋ฅ˜
  • ๋น„์ง€์† ์—ฐ๊ฒฐ: Three-Way Handshake๋ฅผ ํ†ตํ•ด TCP ์—ฐ๊ฒฐ ์ˆ˜๋ฆฝ ํ›„ ์š”์ฒญ์— ๋Œ€ํ•œ ์‘๋‹ต์„ ๋ฐ›์œผ๋ฉด ์—ฐ๊ฒฐ์„ ์ข…๋ฃŒํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋™์ž‘ํ•˜๋ฉฐ ์ถ”๊ฐ€์ ์ธ ์š”์ฒญ-์‘๋‹ต์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋‹ค์‹œ TCP ์—ฐ๊ฒฐ์„ ํ•ด์•ผํ•จ
  • ์ง€์† ์—ฐ๊ฒฐ(Persistent Connection ๋˜๋Š” Keep-Alive): ํ•˜๋‚˜์˜ TCP ์—ฐ๊ฒฐ์ƒ์—์„œ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์š”์ฒญ-์‘๋‹ต์„ ์ฃผ๊ณ ๋ฐ›์„ ์ˆ˜ ์žˆ๋Š” ๊ธฐ์ˆ 

๐ŸŒ HTTP Message

HTTP ๋ฉ”์„ธ์ง€์˜ ๊ตฌ์„ฑ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๊ตฌ์„ฑ๋‚ด์šฉ
Start-Lineโ€ข Request: HTTP-Method ๊ณต๋ฐฑ Request-Target ๊ณต๋ฐฑ HTTP/Version
โ€ข Response: HTTP/Version ๊ณต๋ฐฑ Status-Code ๊ณต๋ฐฑ Reason-Phrase
Field-LineHTTP-Header
Message-Body๋ฉ”์„ธ์ง€ ๋ณธ๋ฌธ์€ ์กด์žฌํ•˜์ง€ ์•Š์„ ์ˆ˜๋„ ์žˆ๊ณ , ๋‹ค์–‘ํ•œ ์ฝ˜ํ…์ธ  ํƒ€์ž…์ด ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ์Œ

๐ŸŒ HTTP Method

HTTP Method๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

HTTP Method์„ค๋ช…
GET์ž์›์˜ ํŠน์ • ํ‘œํ˜„์„ ์Šต๋“ํ•˜๊ธฐ ์œ„ํ•œ ๋ฉ”์„œ๋“œ
HEADGET๊ณผ ๋™์ผํ•˜๋‚˜, Header๋งŒ์„ ์‘๋‹ต๋ฐ›๋Š” ๋ฉ”์„œ๋“œ
POSTServer๋กœ ํ•˜์—ฌ๊ธˆ ํŠน์ • ์ž‘์—…์„ ์ฒ˜๋ฆฌํ•˜๋„๋ก ํ•˜๋Š” ๋ฉ”์„œ๋“œ
PUTโ€ข ์š”์ฒญ ์ž์›์ด ์—†๋‹ค๋ฉด ๋ฉ”์„ธ์ง€ ๋ณธ๋ฌธ์œผ๋กœ ์ž์›์„ ์ƒ์„ฑ
โ€ข ์ด๋ฏธ ์ž์›์ด ์žˆ๋‹ค๋ฉด ๋ฉ”์„ธ์ง€ ๋ณธ๋ฌธ์œผ๋กœ ์ž์›์„ ์™„์ „ํžˆ ๋Œ€์ฒด
PATCH์ž์›์— ๋Œ€ํ•œ ๋ถ€๋ถ„์  ์ˆ˜์ •์„ ์œ„ํ•œ ๋ฉ”์„œ๋“œ
DELETE์ž์›์„ ์‚ญ์ œํ•˜๊ธฐ ์œ„ํ•œ ๋ฉ”์„œ๋“œ
CONNECT์ž์›์— ๋Œ€ํ•œ ์–‘๋ฐฉํ–ฅ ์—ฐ๊ฒฐ์„ ์‹œ์ž‘ํ•˜๋Š” ๋ฉ”์„œ๋“œ
OPTIONS์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ฉ”์„œ๋“œ ๋“ฑ ํ†ต์‹  ์˜ต์…˜์„ ํ™•์ธํ•˜๋Š” ๋ฉ”์„œ๋“œ
TRACE์ž์›์— ๋Œ€ํ•œ ๋ฃจํ”„๋ฐฑ ํ…Œ์ŠคํŠธ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฉ”์„œ๋“œ

๐ŸŒ HTTP Status Code

HTTP Status Code๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Status Code์ •์˜์˜ˆ์‹œ
100 ~ 199์ •๋ณด์„ฑ ์ƒํƒœ ์ฝ”๋“œย 
200 ~ 299์„ฑ๊ณต ์ƒํƒœ ์ฝ”๋“œโ€ข 200 OK: ์š”์ฒญ์ด ์„ฑ๊ณต
โ€ข 201 Created: ์š”์ฒญ์ด ์„ฑ๊ณตํ–ˆ์œผ๋ฉฐ, ์ƒˆ๋กœ์šด ์ž์›์ด ์ƒ์„ฑ๋˜์—ˆ์Œ
โ€ข 202 Accepted: ์š”์ฒญ์„ ์ž˜ ๋ฐ›์•˜์œผ๋‚˜ ์•„์ง ์š”์ฒญํ•œ ์ž‘์—…์„ ๋๋‚ด์ง€ ์•Š์•˜์Œ
โ€ข 204 No Content: ์š”์ฒญ์ด ์„ฑ๊ณตํ–ˆ์ง€๋งŒ, ๋ฉ”์„ธ์ง€ ๋ณธ๋ฌธ์œผ๋กœ ํ‘œ์‹œํ•  ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์Œ
300 ~ 399Redirection ์ƒํƒœ ์ฝ”๋“œโ€ข 301 Moved Permanently: Permanent Redirection์œผ๋กœ ์žฌ์š”์ฒญ ๋ฉ”์„œ๋“œ๊ฐ€ GET์œผ๋กœ ๋ณ€๊ฒฝ๋  ์ˆ˜ ์žˆ์Œ
โ€ข 308 Permanent Redirect: Permanent Redirection์œผ๋กœ ์žฌ์š”์ฒญ ๋ฉ”์„œ๋“œ๊ฐ€ ๋ณ€๊ฒฝ๋˜์ง€ ์•Š์Œ
โ€ข 302 Found: Temporary Redirection์œผ๋กœ ์žฌ์š”์ฒญ ๋ฉ”์„œ๋“œ๊ฐ€ GET์œผ๋กœ ๋ณ€๊ฒฝ๋  ์ˆ˜ ์žˆ์Œ
โ€ข 303 See Other: Temporary Redirection์œผ๋กœ ์žฌ์š”์ฒญ ๋ฉ”์„œ๋“œ๊ฐ€ GET์œผ๋กœ ๋ณ€๊ฒฝ
โ€ข 307 Temporary Redirect: Temporary Redirection์œผ๋กœ ์žฌ์š”์ฒญ ๋ฉ”์„œ๋“œ๊ฐ€ ๋ณ€๊ฒฝ๋˜์ง€ ์•Š์Œ
400 ~ 499Client ์—๋Ÿฌ ์ƒํƒœ ์ฝ”๋“œโ€ข 400 Bad Request: Client ์š”์ฒญ์ด ์ž˜๋ชป๋˜์—ˆ์Œ
โ€ข 401 Unauthorized: ์š”์ฒญํ•œ ์ž์›์— ๋Œ€ํ•œ ์œ ํšจํ•œ ์ธ์ฆ์ด ์—†์Œ
โ€ข 403 Forbidden: ์š”์ฒญ์ด Server์— ์˜ํ•ด ๊ฑฐ๋ถ€๋จ(์ ‘๊ทผ ๊ถŒํ•œ์ด ์—†๋Š” ๊ฒฝ์šฐ)
โ€ข 404 Not Found: ์š”์ฒญ ๋ฐ›์€ ์ž์›์„ ์ฐพ์„ ์ˆ˜ ์—†์Œ
โ€ข 405 Method Not Allowed: ์š”์ฒญํ•œ ๋ฉ”์„œ๋“œ๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์Œ
500 ~ 599Server ์—๋Ÿฌ ์ƒํƒœ ์ฝ”๋“œโ€ข 500 Internal Server Error: ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์—†์Œ
โ€ข 502 Bad Gateway: ์ค‘๊ฐ„ Server์˜ ํ†ต์‹  ์˜ค๋ฅ˜
โ€ข 503 Service Unavailable: ํ˜„์žฌ๋Š” ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์—†์œผ๋‚˜ ์ถ”ํ›„ ๊ฐ€๋Šฅํ•  ์ˆ˜๋„ ์žˆ์Œ
  • Redirection: Client๊ฐ€ ์š”์ฒญํ•œ ์ž์›์ด ๋‹ค๋ฅธ ๊ณณ์— ์žˆ๋Š” ๊ฒฝ์šฐ Client์˜ ์š”์ฒญ์„ ๋‹ค๋ฅธ ๊ณณ์œผ๋กœ ์ด๋™์‹œํ‚ค๋Š” ๊ฒƒ์„ ์˜๋ฏธ
  • Permanent Redirection: ์ž์›์ด ์™„์ „ํžˆ ์ƒˆ๋กœ์šด ๊ณณ์œผ๋กœ ์ด๋™ํ•˜์—ฌ ๊ฒฝ๋กœ๊ฐ€ ์˜๊ตฌ์ ์œผ๋กœ ์žฌ์ง€์ •๋˜๋Š” ๊ฒƒ์„ ์˜๋ฏธ
  • Temporary Redirection: ์ž์›์˜ ์œ„์น˜๊ฐ€ ์ž„์‹œ๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ๊ฑฐ๋‚˜ ์ž„์‹œ๋กœ ์‚ฌ์šฉํ•  URL์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ์— ์‚ฌ์šฉ

๐ŸŒ HTTP Header

HTTP์˜ Header๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

์š”์ฒญ ์‹œ ํ™œ์šฉ๋˜๋Š” HTTP HeaderHost: Domain Name(+ Port Number)
User-Agent: OS, Browser ์ข…๋ฅ˜ ๋ฐ ๋ฒ„์ „๊ณผ Rendering Engine๊ณผ ๊ฐ™์€ ์ •๋ณด๊ฐ€ ๋ช…์‹œ
Referer: Client๊ฐ€ ์š”์ฒญ์„ ๋ณด๋‚ผ ๋•Œ ๋จธ๋ฌด๋ฅด๊ณ  ์žˆ๋˜ URL ๋ช…์‹œ
Authorization: Client์˜ ์ธ์ฆ ์ •๋ณด ๋ช…์‹œ
์‘๋‹ต ์‹œ ํ™œ์šฉ๋˜๋Š” HTTP HeaderServer: ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๋Š” Server์˜ S/W์™€ ๊ด€๋ จ๋œ ์ •๋ณด๋ฅผ ๋ช…์‹œ
Allow: Client์—๊ฒŒ ํ—ˆ์šฉ๋œ HTTP Method ๋ชฉ๋ก์„ ๋ช…์‹œ
Retry-After: ํ•ด๋‹น ์ž์›์˜ ์‚ฌ์šฉ ๋‚ ์งœ ํ˜น์€ ์‹œ๊ฐ์„ ๋ช…์‹œ
Location: Client์—๊ฒŒ ์ž์›์˜ ์œ„์น˜๋ฅผ ๋ช…์‹œ
WWW-Authenticate: ์ž์›์— ์ ‘๊ทผํ•˜๊ธฐ ์œ„ํ•œ ์ธ์ฆ ๋ฐฉ์‹์„ ๋ช…์‹œ
์š”์ฒญ๊ณผ ์‘๋‹ต ๋ชจ๋‘์—์„œ ํ™œ์šฉ๋˜๋Š” HTTP HeaderDate: ์ƒ์„ฑ๋œ ๋‚ ์งœ์™€ ์‹œ๊ฐ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ๋ช…์‹œ
Connection: Client์˜ ์š”์ฒญ๊ณผ ์‘๋‹ต ๊ฐ„์˜ ์—ฐ๊ฒฐ ๋ฐฉ์‹์„ ๋ช…์‹œ(keep-alive, close)
Content-Length: HTTP Message-Body์˜ ํฌ๊ธฐ(Byte)๋ฅผ ๋ช…์‹œ
Content-Type: HTTP Message-Body์—์„œ ์‚ฌ์šฉ๋œ Media Type์„ ๋ช…์‹œ
Content-Language: ์–ด๋–ค ๊ตญ๊ฐ€์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์–ด๋–ค ์–ธ์–ด๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”์ง€ ๋ช…์‹œ(์–ธ์–ด-๊ตญ๊ฐ€)
Content-Encoding: HTTP Message-Body์„ ์••์ถ•ํ•˜๊ฑฐ๋‚˜ ๋ณ€ํ™˜ํ•œ ๋ฐฉ์‹์„ ๋ช…์‹œ

๐ŸŒ HTTPS(HTTP Secure)

SSL(Secure Sockets Layer)๊ณผ TLS(Transport Layer Security)๋Š” ์ธ์ฆ๊ณผ ์•”ํ˜ธํ™”๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š” ํ”„๋กœํ† ์ฝœ์ด๋ฉฐ, TLS๋Š” SSL์„ ๊ณ„์Šนํ•œ ํ”„๋กœํ† ์ฝœ์ž…๋‹ˆ๋‹ค.

SSL/TLS๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋Œ€ํ‘œ์ ์ธ Protocol์€ HTTPS(HTTP over TLS)์ž…๋‹ˆ๋‹ค.

SSL/TLS์˜ ์ž‘๋™๊ณผ์ •์€ ์‚ฌ์šฉ๋˜๋Š” ์•”ํ˜ธ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฒ„์ „์— ๋”ฐ๋ผ ์„ธ๋ถ€์ ์ธ ์ฐจ์ด๊ฐ€ ์žˆ๊ธฐ๋Š” ํ•˜์ง€๋งŒ ํฐํ‹€์€ ๋น„์Šทํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ฃผ๋กœ ์‚ฌ์šฉ๋˜๋Š” TLS $1.3$์„ ๊ธฐ๋ฐ˜์œผ๋กœ HTTPS ๋ฉ”์„ธ์ง€๊ฐ€ ์†ก์ˆ˜์‹ ๋˜๋Š” ๊ณผ์ •์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

1๏ธโƒฃ TCP Three-Way Handshakeย 
2๏ธโƒฃ TLS Handshakeโž€ Client๋Š” Server์—๊ฒŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์•”ํ˜ธํ™” ๋ฐฉ์‹๊ณผ ํ•ด์‹œํ•จ์ˆ˜๋ฅผ ๋‹ด์€ ์ •๋ณด์ธ ์•”ํ˜ธ ์Šค์œ„ํŠธ(Cipher Suite)์™€ ์ง€์›๋˜๋Š” TLS ๋ฒ„์ „ ๋“ฑ์„ ํฌํ•จํ•œ ๋ฉ”์„ธ์ง€๋ฅผ ์ „๋‹ฌ
โž Server๋Š” Client์—๊ฒŒ ์ œ์‹œ๋œ ์ •๋ณด๋“ค์—์„œ ์‚ฌ์šฉํ•˜๊ณ ์ž ํ•˜๋Š” ์ •๋ณด๋“ค์„ ์„ ํƒํ•˜๋Š” ๋ฉ”์„ธ์ง€์™€ ์ธ์ฆ์„œ์™€ ์ธ์ฆ์„œ ๊ฒ€์ฆ์„ ์œ„ํ•œ ๋””์ง€ํ„ธ ์„œ๋ช… ๋ฉ”์„ธ์ง€๋ฅผ ํ•จ๊ฒŒ ์ „๋‹ฌ
โž‚ Client๋Š” ์ธ์ฆ์„œ๋ฅผ ๊ฒ€์ฆ
โžƒ ๊ฒ€์ฆ์„ ํ•œ Client๋Š” Server์—๊ฒŒ TLS Handshake์˜ ๋งˆ์ง€๋ง‰์„ ์˜๋ฏธํ•˜๋Š” Finished ๋ฉ”์„ธ์ง€๋ฅผ ์ฃผ๊ณ  ๋ฐ›์Œ
3๏ธโƒฃ TLS Handshake๋ฅผ ํ†ตํ•ด ์–ป์€ Key๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์•”ํ˜ธํ™”๋œ ๋ฉ”์„ธ์ง€ ์†ก์ˆ˜์‹ ย 

๐ŸŒ Cache

Cache๋ž€ ๋ถˆํ•„์š”ํ•œ ๋Œ€์—ญํญ ๋‚ญ๋น„์™€ ์‘๋‹ต ์ง€์—ฐ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์ •๋ณด์˜ ์‚ฌ๋ณธ์„ ์ž„์‹œ๋กœ ์ €์žฅํ•˜๋Š” ๊ธฐ์ˆ ์„ ๋งํ•ฉ๋‹ˆ๋‹ค.

Cache๋Š” ์›น ๋ธŒ๋ผ์šฐ์ €์— ์ €์žฅ๋˜์–ด ์žˆ๊ธฐ๋„ ํ•˜๊ณ , Client์™€ Server ์‚ฌ์ด์— ์œ„์น˜ํ•œ ์ค‘๊ฐ„ Server์— ์ €์žฅ๋˜์–ด ์žˆ๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค. ์›น ๋ธŒ๋ผ์šฐ์ €์— ์ €์žฅ๋˜์–ด ์žˆ๋Š” ๊ฒฝ์šฐ Private Cache๋ผ ํ•˜๊ณ  ์ค‘๊ฐ„ Server์— ์ €์žฅ๋˜์–ด ์žˆ๋Š” ๊ฒฝ์šฐ Public Cache๋ผ ๋ถ€๋ฆ…๋‹ˆ๋‹ค.

Cache๋Š” ์ •๋ณด์˜ ์‚ฌ๋ณธ์„ ์ž„์‹œ๋กœ ์ €์žฅํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์›๋ณธ ๋ฐ์ดํ„ฐ์™€ ๋˜‘๊ฐ™์ด ์œ ์ง€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ Cache๋œ ๋ฐ์ดํ„ฐ๊ฐ€ ์–ผ๋งˆ๋‚˜ ์ตœ์‹  ์›๋ณธ ๋ฐ์ดํ„ฐ์™€ ์œ ์‚ฌํ•œ์ง€๋ฅผ ํ‘œํ˜„ํ•˜๋Š” Cache Freshness(์บ์‹œ ์‹ ์„ ๋„)๋ฅผ ์œ ์ง€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋จผ์ € ์›๋ณธ ๋ฐ์ดํ„ฐ๋ฅผ Cacheํ•  ๋•Œ ์œ ํšจ ๊ธฐ๊ฐ„์„ ์„ค์ •ํ•ด ์œ ํšจ ๊ธฐ๊ฐ„์ด ๋๋‚˜๋ฉด ๋‹ค์‹œ Cache ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ Cache Freshness๋ฅผ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์œ ํšจ ๊ธฐ๊ฐ„์„ ๋ถ€์—ฌํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์œ ํšจ ๋‚ ์งœ๋ฅผ ํ‘œ๊ธฐํ•˜๋Š” ExpiresHeader์™€ ์œ ํšจ ์‹œ๊ฐ์„ ํ‘œ๊ธฐํ•˜๋Š” Cache-ControlHeader์˜ Max-Age ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์œ ํšจ ๊ธฐ๊ฐ„์ด ๋งŒ๋ฃŒ๋œ Cache๋Š” ์—ฌ์ „ํžˆ ์ตœ์‹  ์ƒํƒœ์ธ์ง€ ์žฌ๊ฒ€์‚ฌํ•ด์•ผ ํ•˜๋Š”๋ฐ ์žฌ๊ฒ€์‚ฌํ•˜๋Š” ๋ฐฉ๋ฒ•์—๋Š” ํฌ๊ฒŒ ๋‘ ๊ฐ€์ง€๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

์žฌ๊ฒ€์‚ฌ ๋ฐฉ๋ฒ•์„ค๋ช…
๋‚ ์งœ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์žฌ๊ฒ€์‚ฌClient๋Š” If-Modified-SinceHeader๋ฅผ ํ†ตํ•ด Server์—๊ฒŒ ํŠน์ • ์‹œ์ (๋‚ ์งœ์™€ ์‹œ๊ฐ) ์ดํ›„๋กœ ์›๋ณธ ๋ฐ์ดํ„ฐ์— ๋ณ€๊ฒฝ์ด ์žˆ์—ˆ๋Š”์ง€ ํ™•์ธ
๋ฒ„์ „์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์žฌ๊ฒ€์‚ฌIf-None-Match Header๋ฅผ ํ†ตํ•ด Etag(Entity Tage) ๊ฐ’๊ณผ ์ผ์น˜ํ•˜๋Š” ์ž์›์ด ์žˆ๋Š”์ง€ ํ™•์ธ

์ž์›์„ ๋ณ€๊ฒฝ๋  ๋•Œ๋งˆ๋‹ค ์ž์›์˜ ๋ฒ„์ „์„ ์‹๋ณ„ํ•˜๋Š” Etag(Entity Tage)๊ฐ’์ด ๋ณ€๊ฒฝ

Cookie๋ž€ Server์—์„œ ์ƒ์„ฑ๋˜์–ด Client ์ธก์— ์ €์žฅ๋˜๋Š” ๋ฐ์ดํ„ฐ๋กœ, ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•˜์ง€ ์•Š๋Š” HTTP์˜ ํŠน์„ฑ(Stateless)์„ ๋ณด์™„ํ•˜๊ธฐ ์œ„ํ•œ ์ˆ˜๋‹จ์„ ๋งํ•ฉ๋‹ˆ๋‹ค.

Cookie๋Š” <์ด๋ฆ„, ๊ฐ’> ์Œ์˜ ํ˜•ํƒœ๋กœ ์ •๋ณด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๊ณ  ์ถ”๊ฐ€์ ์œผ๋กœ ์ ์šฉ ๋ฒ”์œ„์™€ ๋งŒ๋ฃŒ ๊ธฐ๊ฐ„ ๋“ฑ ๋‹ค์–‘ํ•œ ์†์„ฑ์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Cookie๋กœ ์ „๋‹ฌ๋˜๋Š” ๋Œ€ํ‘œ์ ์ธ ์ •๋ณด๋กœ Session Id๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. Server๋Š” Client๋กœ ๋ถ€ํ„ฐ ์ „๋‹ฌ๋ฐ›์€ Cookie ์† Session Id์™€ DB์— ์ €์žฅ๋œ Session ID๋ฅผ ๋น„๊ตํ•˜์—ฌ Client๋ฅผ ์‹๋ณ„ํ•˜์—ฌ ๋ฒˆ๊ฑฐ๋กœ์šด ์ธ์ฆ ๊ณผ์ •์„ ๊ฑฐ์น  ํ•„์š”๊ฐ€ ์—†์–ด์ง‘๋‹ˆ๋‹ค.

Cookie๋Š” ์‘๋‹ต ๋ฉ”์„ธ์ง€์˜ Set-Cookie Header์™€ ์š”์ฒญ ๋ฉ”์„ธ์ง€์˜ Cookie Header๋ฅผ ํ†ตํ•ด ์ „๋‹ฌ๋ฉ๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ Cookie์˜ ๋Œ€ํ‘œ์ ์ธ ํ•œ๊ณ„๋Š” ๋ณด์•ˆ์ž…๋‹ˆ๋‹ค. Cookie์— ๊ฐœ์ธ ์ •๋ณด๋ฅผ ๋น„๋กฏํ•ด ๋ณด์•ˆ์— ๋ฏผ๊ฐํ•œ ์ •๋ณด๋ฅผ ๋‹ด์•„ ์†ก์ˆ˜์‹ ํ•˜๊ณ  ์ €์žฅํ•˜๋Š” ๊ฒƒ์ด ๋ฐ”๋žŒ์งํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ์ด๋ฅผ ๋ณด์™„ํ•˜๊ธฐ ์œ„ํ•œ ์†์„ฑ์œผ๋กœ Secure์™€ HttpOnly๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

SecureHTTPS๊ฐ€ ์‚ฌ์šฉ๋˜๋Š” ๊ฒฝ์šฐ์—๋งŒ Cookie๋ฅผ ์ „์†ก
HttpOnlyCookie ๊ด€๋ จ ๋ฐ์ดํ„ฐ๋Š” HTTP-Header ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ JavaScript๋ฅผ ํ†ตํ•ด์„œ๋„ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•œ๋ฐ JavaScript๋ฅผ ํ†ตํ•ด ์ ‘๊ทผ์ด ๋ถˆ๊ฐ€๋Šฅ ํ•˜๋„๋ก ํ•˜๋Š” ์†์„ฑ

๐ŸŒ Content Negotiation

์ฝ˜ํ…์ธ  ํ˜‘์ƒ(Content Negotiation)์ด๋ž€, ๊ฐ™์€ URI์— ๋Œ€ํ•ด ๊ฐ€์žฅ ์ ํ•ฉํ•œ ์ž์›์˜ ํ˜•ํƒœ๋ฅผ ์ œ๊ณตํ•˜๋Š” ๋ฉ”์ปค๋‹ˆ์ฆ˜์„ ๋งํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด ๊ฐ™์€ URI๋กœ ์‹๋ณ„ ๊ฐ€๋Šฅํ•œ HTML ๋ฌธ์„œ๋ผ ํ•ด๋„, ์˜์–ด๋กœ ์š”์ฒญํ•˜๋ฉด ์˜์–ด๋กœ ๋œ ํ˜•ํƒœ๋กœ ์ œ๊ณตํ•˜๊ณ , ํ•œ๊ตญ์–ด๋กœ ์š”์ฒญํ•˜๋ฉด ํ•œ๊ตญ์–ด๋กœ ๋œ ํ˜•ํƒœ๋ฅผ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ฆ‰, ์ฝ˜ํ…์ธ  ํ˜‘์ƒ์€ Client์—๊ฒŒ ๊ฐ€์žฅ ์ ํ•ฉํ•œ ์ž์›์˜ ํ‘œํ˜„์„ ์ œ๊ณตํ•˜๋Š” ๋ฉ”์ปค๋‹ˆ์ฆ˜์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

์ฝ˜ํ…์ธ  ํ˜‘์ƒ๊ณผ ๊ด€๋ จ๋œ Header๋กœ๋Š” Accept, Accept-Language, Accept-Charset, Accept-Encoding์ด ์žˆ์Šต๋‹ˆ๋‹ค.

This post is licensed under CC BY 4.0 by the author.

๐ŸŒ [Network] TCP/IP Model - Transport Layer ๐ŸŒ

๐ŸŒ [Network] TCP/IP Model - Wi-Fi ๐ŸŒ