λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°

빈 ꡬ멍 μ±„μš°κΈ°

[Network] HTTP headers

 

기적을 λΆ€λ₯΄λŠ” μ•ˆλ“œλ‘œμ΄λ“œ 톡신 ν”„λ‘œκ·Έλž˜λ°

 

기적을 λΆ€λ₯΄λŠ” μ•ˆλ“œλ‘œμ΄λ“œ 톡신 ν”„λ‘œκ·Έλž˜λ° - YES24

μ•ˆλ“œλ‘œμ΄λ“œ ν”„λ‘œκ·Έλž˜λ° μ•ˆλ‚΄μ„œ. μ•ˆλ“œλ‘œμ΄λ“œκ°€ μ œκ³΅ν•˜λŠ” κΈ°λŠ₯듀에 κ΅­ν•œν•˜μ§€ μ•Šκ³  λ‹€μ–‘ν•œ μ—…μ²΄μ—μ„œ μ œκ³΅ν•˜λŠ” νŒ¨ν‚€μ§€μ™€ 톡신 ν”„λ‘œν† μ½œ 그리고 μžλ°”μ˜ 고유 κΈ°λŠ₯을 μ‚¬μš©ν•˜μ—¬ ν†΅μ‹ μ˜ μ „λ°˜μ μΈ κΈ°λŠ₯

www.yes24.com

https://www.blog-dreamus.com/post/cache-control-%EC%9D%B4-%ED%95%84%EC%9A%94%ED%95%9C-%EC%9D%B4%EC%9C%A0

 

'Cache-Control'이 ν•„μš”ν•œ 이유

μ•±μ˜ μ„±λŠ₯을 ν–₯μƒμ‹œν‚€λŠ” 방법 쀑 ν•˜λ‚˜μΈ μΊμ‹œ. ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ 캐쉬λ₯Ό ν•˜κ³ , μ„œλ²„μ—μ„œ 컨트둀이 κ°€λŠ₯ν•œ Cache-Control에 λŒ€ν•΄μ„œ μ•Œμ•„λ΄…λ‹ˆλ‹€.

www.blog-dreamus.com

https://www.geeksforgeeks.org/http-headers/?ref=lbp 

 

HTTP headers - GeeksforGeeks

A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

www.geeksforgeeks.org

 

URLConnectionμ—μ„œ 헀더 정보 μž‘μ„±ν•˜κΈ°

setRequestProperty(), addRequestProperty() μ‚¬μš©

https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#addRequestProperty(java.lang.String,%20java.lang.String) 

https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#setRequestProperty(java.lang.String,%20java.lang.String) 

 

URLConnection (Java Platform SE 7 )

Returns a permission object representing the permission necessary to make the connection represented by this object. This method returns null if no permission is required to make the connection. By default, this method returns java.security.AllPermission.

docs.oracle.com

 

OkHttpμ—μ„œμ˜ 헀더 정보 μž‘μ„±ν•˜κΈ°

https://square.github.io/okhttp/recipes/#accessing-headers-kt-java

 

Recipes - OkHttp

private val client = OkHttpClient.Builder() .authenticator(object : Authenticator { @Throws(IOException::class) override fun authenticate(route: Route?, response: Response): Request? { if (response.request.header("Authorization") != null) { return null //

square.github.io

 

 

HTTP ν”„λ‘œν† μ½œμ˜ 헀더

λ©”μ‹œμ§€ 헀더 Message Header

ν˜•μ‹ - RFC의 κ·œμ•½μœΌλ‘œ μ΄λ ‡κ²Œ 정해짐

message-header = field-name ":" [ field-value ]
field-name = token
field-vlaue = *( field-content | LWS )
  • ν•„λ“œμ΄λ¦„ field-name : '헀더 이름'이라 뢀름.보톡 토큰 token 이라 ν‘œν˜„ν•¨.
  • ν•„λ“œ κ°’ field-value : '헀더값'이라 뢀름. '*( field-content | LWS )' ν˜•μ‹μœΌλ‘œ ν‘œν˜„ν•¨.
    • field-content ν•„λ“œ λ‚΄μš© : 일반 λ¬Έμžλ‚˜ 사전 μ •μ˜λœ 토큰 λ˜λŠ” κ΅¬λΆ„μž 그리고 인용문자둜 ꡬ성됨
    • * : λ°˜λ³΅μ„ μ˜λ―Έν•œλ‹€. 
    • LWS(Linear White Space) : νƒ­, 곡백, 라인ꡬ뢄을 μ˜λ―Έν•œλ‹€. 

 

헀더 ν•„λ“œμ˜ μ •λ ¬ μˆœμ„œλŠ” μ€‘μš”ν•˜μ§€ μ•ŠμŒ. 

κ΄€ν–‰μ μœΌλ‘œ 일반 헀더 ν•„λ“œ > μš”μ²­ 헀더(응닡 헀더) > μ—”ν‹°ν‹° 헀더 ν•„λ“œ μˆœμ„œκ°€ μΌλ°˜μ μž„.

 

일반 헀더General Header

μš”μ²­κ³Ό 응닡 λ©”μ‹œμ§€ λͺ¨λ‘μ—μ„œ 일반적으둜 μ‚¬μš©ν•˜λŠ” 정보

general-header = Cache-Control
                | Connection
                | Date
                | Transfer-Encoding
                | Upgrade
                | Via

Cach-Control

μ„œλ²„μ™€ ν΄λΌμ΄μ–ΈνŠΈ λ‚΄ μΊμ‹œλ₯Ό μ’€ 더 효율적으둜 닀루기 μœ„ν•¨. μΊμ‹œ λ§€μ»€λ‹ˆμ¦˜μ— λŒ€ν•œ μ§€μ‹œλ¬Έμ„ μ§€μ •ν•˜λŠ”λ° 일반적으둜 μ‚¬μš©ν•œλ‹€. 

μΊμ‹œ μ‚¬μš© λͺ©μ  : μš”μ²­κ³Ό μ‘λ‹΅μ˜ 횟수(round-trip)을 쀄여 λ„€νŠΈμ›Œν¬μ˜ λŒ€μ—­ν­μ„ ν–₯μƒμ‹œν‚€λŠ” λͺ©μ 

 

Connection

μ›λž˜ HTTP 톡신은 μš”μ²­κ³Ό 응닡 이후, μ„œλ‘œ 톡신을 λŠλŠ” 것을 기본으둜 ν•œλ‹€. κ·ΈλŸ¬λ‚˜ 이와 같은 톡신 방법은 λΉˆλ²ˆν•œ 접속에 λ”°λ₯Έμ„œλ²„μ˜ κ³ΌλΆ€ν•˜λ₯Ό μœ λ°œν•œλ‹€. λ”°λΌμ„œ μ΄λŸ¬ν•œ λ¬Έμ œν•΄κ²° λ°©μ•ˆμœΌλ‘œ Connection 헀더 ν•„λ“œλ₯Ό μ‚¬μš©ν•΄ 기본으둜 μš”μ²­, 응닡 ν›„ 연결을 μœ μ§€ν•  지 κ²°μ •ν•˜λŠ” κΈ°λŠ₯을 μ œκ³΅ν•œλ‹€.

 

Date

λ©”μ‹œμ§€λ₯Ό μƒμ„±ν•œ μ‹œκ°„μ„ μ˜λ―Έν•œλ‹€. 일자λ₯Ό 톡해 ν–₯ν›„ λ¬Έμ„œλ₯Ό μœ μ§€ν•  지 μ•„λ‹ˆλ©΄ 버릴지λ₯Ό κ²°μ •ν•œλ‹€.

 

Trasnfer-Encoding

λ©”μ‹œμ§€ λ³Έλ¬Έμ—μ„œ μ‚¬μš©ν•œ 인코딩 방식을 μ˜λ―Έν•œλ‹€. 

μ‚¬μš© λͺ©μ  : HTTP ν”„λ‘œν† μ½œ λ‚΄ 헀더λ₯Ό 포함해 전체 데이터λ₯Ό μ•ˆμ „ν•˜κ²Œ μ „μ†‘ν•˜κΈ° μœ„ν•΄ 8λΉ„νŠΈμ˜ μ „μ†‘κ·œμ•½μ— λ§žμΆ”μ–΄ μ•”ν˜Έν™”μ‹œμΌœ 전솑할 λ•Œ μ‚¬μš©ν•œλ‹€.

 

Upgrade

ν΄λΌμ΄μ–ΈνŠΈμ™€ μ„œλ²„μ™€ ν†΅μ‹ ν•˜λ˜ 쀑 ν”„λ‘œν† μ½œμ˜ 변경이 ν•„μš”ν•  λ•Œ μ‚¬μš©ν•œλ‹€.

예 : HTTPλ₯Ό μ‚¬μš©ν•˜λ‹€κ°€ λ³΄μ•ˆμ„ μœ„ν•΄μ„œ HTTPS ν”„λ‘œν† μ½œλ‘œ 변경이 ν•„μš”ν•œ 경우 μ‚¬μš©ν•œλ‹€.

μ„œλ²„μ™€ ν΄λΌμ΄μ–ΈνŠΈκ°€ λͺ¨λ‘ μƒˆλ‘œ μ‚¬μš©ν•  ν”„λ‘œν† μ½œμ„ 지원해야 ν•˜κΈ° λ•Œλ¬Έμ— μ—…κ·Έλ ˆμ΄λ“œλŠ” μƒλŒ€κ°€ "κ°€λŠ₯ν•˜λ‹€λ©΄, λ‹€λ₯Έ ν”„λ‘œν† μ½œλ‘œ λ°”κΏ¨μœΌλ©΄ ν•œλ‹€"λΌλŠ” 의미둜 μ‚¬μš©ν•¨.

 

Via

κ²Œμ΄ν¬μ›¨μ΄λ‚˜ ν”„λ½μ‹œλŠ” μ„œλ²„μ— μš”μ²­ λ©”μ‹œμ§€λ₯Ό λ§Œλ“€μ–΄ 보낼 λ•Œ λ°˜λ“œμ‹œ Via ν•„λ“œλ₯Ό μ‚¬μš©ν•΄μ•Όν•œλ‹€. μ—­μœΌλ‘œ ν΄λΌμ΄μ–ΈνŠΈμ— 응닡 λ©”μ‹œμ§€λ₯Ό μ „μ†‘ν•˜λ©΄ Via ν•„λ“œλ₯Ό μ‚¬μš©ν•΄ μžμ‹ μ΄ κ²Œμ΄νŠΈμ›¨μ΄λ‚˜ ν”„λΌμ‹œλΌλŠ” 사싀을 μ•Œλ €μ£Όμ–΄μ•Ό ν•œλ‹€.

 

Warning

μ„œλ²„μ˜ κ²½κ³ λ₯Ό μ•Œλ¦°λ‹€. 

 

μš”μ²­ 헀더 Request-Header

μš”μ²­μ— λŒ€ν•œ 좔가적인 정보λ₯Ό λ‹΄κ³  μžˆλ‹€.

request-header = Accept
                | Accept-Charset
                | Accept-Encoding
                | Accept-Language
                | Authorization
                | Expect
                | From
                | Host
                | If-Match
                | If-Modified-Since
                | If-None-Match
                | If-Range
                | If-Unmodified-Since
                | Max-Forwards
                | Proxy-Authorization
                | Range
                | Referer
                | TE
                | User-Agent

Accept

ν΄λΌμ΄μ–ΈνŠΈ μžμ‹ μ΄ μ²˜λ¦¬ν•  수 μžˆλŠ” λ―Έλ””μ–΄ νƒ€μž…μ„ 지정해 μ„œλ²„μ—κ²Œ μš”μ²­ν•œλ‹€. 

 

ν‘œκΈ°

Accept = "Accept" ":" #( media-range [ accept-params ] )

media-range = ( "*/*" | (type "/" subtype ) ) *( ";" parameter )
accept-params = ";" "q" "=" qvalue *( accept-extension )
accept-extension = ";" token [ "=" ( token | quoted-string ) ]
  • # : μ΅œμ†Œ 2개 μ΄μƒμ˜ μš”μ†Œ
  • ; : κ΅¬λΆ„μžλ‘œ μ•žμ˜ 토큰에 λŒ€ν•œ 좔가적인 정보λ₯Ό μ•Œλ¦¬κΈ° μœ„ν•΄ μ‚¬μš©ν•œλ‹€.
  • | : 'λ˜λŠ”'의 의미둜 μ‚¬μš©ν•œλ‹€.

 

예

Accept: audio/*; q=0.2; audio/basic
  • q : ν’ˆμ§ˆλ“±κΈ‰. Quality factor. μƒλŒ€μ  μ€‘μš”μ„±(κ°€μ€‘μΉ˜)λ₯Ό ν‘œμ‹œν•œλ‹€. μ΅œμ†Œκ°’ 0λΆ€ν„° μ΅œλŒ€κ°’ 1κΉŒμ§€ λ²”μœ„μ˜ μ‹€μˆ˜λ‘œ μ •ν˜•ν™”ν•  수 μžˆλ‹€. μ›ν•˜λŠ” ν’ˆμ§ˆμ— λŒ€ν•œ μƒλŒ€μ μΈ 질 μ €ν•˜λ₯Ό ν‘œν˜„ν•œλ‹€. ν’ˆμ§ˆλ“±κΈ‰μ€ ꡬ체적인 ν‘œν˜„μΌμˆ˜λ‘ 높은 μš°μ„ μˆœμœ„λ₯Ό κ°–λŠ”λ‹€. 별도 ν‘œκΈ°κ°€ μ—†μœΌλ©΄ λ””ν΄νŠΈ 1둜 ν•΄μ„ν•œλ‹€. 0으둜 ν‘œν˜„ν•˜λ©΄ ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ μˆ˜μš©ν•  수 μ—†λŠ” νƒ€μž…μ„ λ‚˜νƒ€λ‚Έλ‹€.

> 기본적인 μ˜€λ””μ˜€ νƒ€μž…("audio/basic")을 μ„ ν˜Έν•˜μ§€λ§Œ 80%μ΄ν•˜λ‘œ 질이 떨어지면 'audio/*'처럼 λ‹€λ₯Έ μ˜€λ””μ˜€ νƒ€μž…μœΌλ‘œ 전솑해 달라.

 

Accept-Charset

ν΄λΌμ΄μ–ΈνŠΈκ°€ 응닡 λ©”μ‹œμ§€ λ‚΄ μ—”ν‹°ν‹°λ‘œ 수용 κ°€λŠ₯ν•œ λ¬Έμžμ…‹μ„ λ‚˜νƒ€λ‚Έλ‹€. ν•œκΈ€μ΄λ‚˜ ν•œμžλ₯Ό ν‘œμ‹œν•  λ•Œ μ‚¬μš©ν•˜λŠ” 'UTF-8'μ΄λ‚˜ 'EUC-KR', 'MS949', 'UTF-16'κ³Ό 같은 λ¬Έμžμ…‹μ„ λ‚˜νƒ€λ‚Έλ‹€.

 

Accept-Encoding

응닡 λ©”μ‹œμ§€μ—μ„œ μ‚¬μš©ν•  수 μžˆλŠ” ν‰λ¬Έμ΄λ‚˜ 압좕방식을 λͺ…μ‹œν•  λ•Œ μ‚¬μš©ν•œλ‹€.

 

Accept-Language

Accept와 μœ μ‚¬ν•˜κ²Œ μš”μ²­ λ©”μ‹œμ§€μ— λŒ€ν•΄ 응닡 λ©”μ‹œμ§€κ°€ μ‚¬μš©ν•  수 μžˆλŠ” μ–Έμ–΄λ₯Ό μ œν•œν•΄ 쀄 것을 μš”μ²­ν•œλ‹€.

 

Authorization

μ‚¬μš©μž 인증을 ν•„μš”λ‘œ ν•˜λŠ” 경우, μ‚¬μš©μžμ˜ 이름과 μ•”ν˜Έλ₯Ό μ „λ‹¬ν•˜κΈ° μœ„ν•˜μ—¬ μ‚¬μš©ν•œλ‹€. 

 

From

λ¬Έμ„œλ₯Ό μš”μ²­ν•œ μ‚¬μš©μžμ˜ e-mail μ£Όμ†Œλ₯Ό μ „λ‹¬ν•œλ‹€.

 

If-Modified-Since

μš”μ²­ν•œ URI λ¦¬μ†ŒμŠ€κ°€ νŠΉμ • 일자 이후 λ³€κ²½λœ 경우, ν•΄λ‹Ή λ¦¬μ†ŒμŠ€λ₯Ό λ‹€μ‹œ 전솑해 달라고 μš”μ²­ν•  λ•Œ μ‚¬μš©ν•œλ‹€.

 

Range

https://www.geeksforgeeks.org/http-headers-range/

 

HTTP headers | Range - GeeksforGeeks

A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

www.geeksforgeeks.org

μ„œλ²„μ—μ„œ λ¬Έμ„œλ₯Ό λ‚˜λˆ μ„œ λΆ€λΆ„λ³„λ‘œ κ°€μ Έμ˜€λ„λ‘ λ²”μœ„λ₯Ό 지정함.

 

Referer

링크둜 μ œκ³΅ν•˜λŠ” λ¬Έμ„œμ˜ URIλ₯Ό μ „μ†‘ν•œλ‹€.

 

User-Agent

https://www.geeksforgeeks.org/http-headers-user-agent/?ref=rp 

 

HTTP headers | User-Agent - GeeksforGeeks

A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

www.geeksforgeeks.org

ν΄λΌμ΄μ–ΈνŠΈ μ†Œν”„νŠΈμ›¨μ–΄μ˜ 정보λ₯Ό μ „λ‹¬ν•œλ‹€. μ‚¬μš©μž μ—μ΄μ „νŠΈλŠ” ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ μ‚¬μš©ν•˜λŠ” μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ„ λ§ν•œλ‹€. 

이 μ •λ³΄λŠ” λ‹€μ–‘ν•œ μ›Ή λΈŒλΌμš°μ € 및 λ‹€μ–‘ν•œ μš΄μ˜μ²΄μ œμ— λ‹€μ–‘ν•œ μ›Ήμ‚¬μ΄νŠΈλ“€μ„ μ œκ³΅ν•˜κΈ° μœ„ν•΄ μ‚¬μš©λœλ‹€. 

 

응닡 헀더 Response-Header

μ„œλ²„κ°€ μš”μ²­ λ©”μ‹œμ§€λ₯Ό λ°›κ³  그에 λŒ€ν•œ 응닡 λ©”μ‹œμ§€ λ‚΄ μƒνƒœ λΌμΈλ§ŒμœΌλ‘œλŠ” μ „λ‹¬ν•˜κΈ° μ–΄λ €μš΄ 정보λ₯Ό ν΄λΌμ΄μ–ΈνŠΈμ—κ²Œ μ „λ‹¬ν•˜κΈ° μœ„ν•΄ μ‚¬μš©ν•œλ‹€.

response-header = Age
                | Location
                | Retry-After
                | Server
                | Warning
                | WWW-Authenticate

Age

ν”„λ‘μ‹œ μ„œλ²„μ—μ„œ μ‚¬μš©ν•œλ‹€. 원본 μ„œλ²„κ°€ ν΄λΌμ΄μ–ΈνŠΈμ— 전달할 데이터λ₯Ό λ§Œλ“  μ‹œκ°„μ„ ν΄λΌμ΄μ–ΈνŠΈμ—κ²Œ 전달할 λ•Œ μ‚¬μš©ν•œλ‹€. 초 λ‹¨μœ„λ‘œ ν‘œμ‹œλœλ‹€.

 

Location

λ¦¬λ‹€μ΄λ ‰νŠΈλœ λ¬Έμ„œμ˜ μ ˆλŒ€ URIλ₯Ό μ•Œλ €μ€€λ‹€.

 

Retry-After

응닡 μƒνƒœ μ½”λ“œ 503κ³Ό ν•¨κ»˜ μ‚¬μš©ν•œλ‹€. "μ–Όλ§ˆ μ‹œκ°„μ΄ 경과된 이후 데이터 μš”μ²­μ„ λ‹€μ‹œ μ‹œλ„ν•˜λΌ" 의미λ₯Ό 가진닀.

 

Server

ν΄λΌμ΄μ–ΈνŠΈμ˜ μš”μ²­μ— λŒ€ν•΄, 원본 μ„œλ²„μ— μ˜ν•΄ μ‚¬μš©λ˜κ³  μžˆλŠ” μ†Œν”„νŠΈμ›¨μ–΄λ₯Ό λ‚˜νƒ€λ‚Έλ‹€.

 

WWW-Authenticate

인증방법을 μ •μ˜ν•œλ‹€. μƒνƒœμ½”λ“œ 401일 λ•Œ, ν•„μš”ν•œ 인증사항을 응닡 λ©”μ‹œμ§€λ‘œ μ „λ‹¬ν•œλ‹€. μ„œλ²„κ°€ 수용 κ°€λŠ₯ν•œ μ‚¬μš©μž 인증을 ν΄λΌμ΄μ–ΈνŠΈμ— μš”κ΅¬ν•  λ•Œ μ‚¬μš©ν•œλ‹€.

 

μ—”ν‹°ν‹° 헀더 Entity Header

μ„œλ²„λŠ” HTTP 버전, μš”μ²­ λ©”μ†Œλ“œλ‚˜ 응닡 μƒνƒœ μ½”λ“œ 등에 μ˜ν•΄ μ œν•œλ°›μ§€ μ•ŠλŠ”λ‹€λ©΄, μš”μ²­ λ©”μ‹œμ§€λ‚˜ 응닡 λ©”μ‹œμ§€μ™€ ν•¨κ»˜ μ—”ν‹°ν‹°λ₯Ό 전솑할 수 μžˆλ‹€. μ—”ν‹°ν‹°λŠ” μ—”ν‹°ν‹° 헀더 ν•„λ“œμ™€ μ—”ν‹°ν‹° λ³Έλ¬Έ(λ˜λŠ” λ©”μ‹œμ§€ λ³Έλ¬Έ)으둜 κ΅¬μ„±λ˜μ–΄ μžˆλ‹€. κ²½μš°μ— 따라 μ–΄λ–€ 응닡 λ©”μ‹œμ§€λŠ” μ—”ν‹°ν‹° ν—€λ”λ§ŒμœΌλ‘œ ꡬ성될 수 μžˆλ‹€.

μ—”ν‹°ν‹° 헀더 ν•„λ“œλŠ” μ—”ν‹°ν‹° 본문에 λŒ€ν•œ 정보λ₯Ό μ •μ˜ν•œλ‹€.

entity-header = Allow
                | Content-Encoding
                | Content-Language
                | Content-Length
                | Content-Location
                | Content-MD5
                | Content-Range
                | Content-Type
                | ETag
                | Expires
                | Last-Modified
                | extension-header

 

Allow

Request-URIκ°€ 지원 κ°€λŠ₯ν•œ λ©”μ†Œλ“œ λͺ©λ‘μ„ ν‘œμ‹œν•œλ‹€.  지원 κ°€λŠ₯ν•œ λ©”μ†Œλ“œλ“€μ˜ 정보λ₯Ό ν΄λΌμ΄μ–ΈνŠΈμ— μ•Œλ¦¬κΈ° μœ„ν•΄ μ‚¬μš©ν•œλ‹€.

Allow: GET, HAED, PUT

 

Content-Encoding

μ—”ν‹°ν‹° 본문이 μ••μΆ•λ˜μ—ˆκ±°λ‚˜ μ•”ν˜Έν™”λ˜μ–΄μžˆμ„ 경우, κ·Έ 인코딩 ν˜•μ‹μ„ μˆ˜μ‹  츑에 μ „λ‹¬ν•˜κΈ° μœ„ν•΄ μ‚¬μš©ν•œλ‹€. λ§Œμ•½ 엔티티에 볡수의 μ••μΆ• 인코딩을 μ μš©ν–ˆμœΌλ©΄, 인코딩 λ‚΄μš©μ€ 적용된 μˆœμ„œμ— 따라 μ—΄κ±°ν•œλ‹€.

 

Content-Type

μ—”ν‹°ν‹° 본문의 λ―Έλ””μ–΄ νƒ€μž…μ„ ν‘œμ‹œν•˜κ±°λ‚˜ λ˜λŠ” μ—”ν‹°ν‹° 본문을 λ°œμ†‘ν•˜κΈ° 전에 μ•žμœΌλ‘œ λ°œμ†‘ν•  λ―Έλ””μ–΄ νƒ€μž…μ„ ν‘œμ‹œν•œλ‹€.

 

Content-Length

μ—”ν‹°ν‹° 본문의 크기λ₯Ό λ°”μ΄νŠΈλ‘œ ν‘œκΈ°ν•œλ‹€.

 

Content-Location

λ©”μ‹œμ§€μ— ν¬ν•¨λœ μ—”ν‹°ν‹°κ°€ μ–΄λ”” λ¦¬μ†ŒμŠ€μ— μœ„μΉ˜ν•˜μ˜€λŠ”μ§€μ— λŒ€ν•œ 정보λ₯Ό μ œκ³΅ν•œλ‹€.

 

ETag

Entity-tag의 μ•½μž. μ›Ήμ„œλ²„μ— μ‚¬μš©ν•˜λŠ” λ¦¬μ†ŒμŠ€ 버전을 μ•Œλ €μ€€λ‹€. 같은 URL이라 ν•˜λ”λΌλ„ λ¦¬μ†ŒμŠ€κ°€ λ³€κ²½λ˜μ—ˆλ‹€λ©΄, Etag둜 λ³€κ²½λœ 버전을 μ•Œλ €μ€€λ‹€.

 

Expires

μ–Έμ œ μ‚¬λΌμ§ˆ 지 μ‹œκ°„, λ‚ μ§œλ₯Ό μ •μ˜ν•œλ‹€. 

 

μ—”ν‹°ν‹° λ³Έλ¬Έ Entitiy Body (λ˜λŠ” λ©”μ‹œμ§€ λ³Έλ¬Έ)

μžˆμ„ μˆ˜λ„ 있고, 없을 μˆ˜λ„ μžˆλ‹€. μš”μ²­ λ˜λŠ” 응닡 λ©”μ‹œμ§€ λ‚΄ λ©”μ‹œμ§€ 본문의 쑴재 μ—¬λΆ€λŠ” λ©”μ‹œμ§€ ν—€λ”μ˜ Content-Length λ˜λŠ” Transfer-Encoding 헀더 ν•„λ“œλ‘œ 확인 κ°€λŠ₯ν•˜λ‹€. Content-Length λ˜λŠ” Transfer-Encoding 헀더 ν•„λ“œκ°€ μžˆλ‹€λ©΄, μš”μ²­ λ˜λŠ” 응닡과 κ΄€λ ¨λœ μ—”ν‹°ν‹° 본문을 μ „μ†‘ν•œλ‹€λŠ” 것을 μ˜λ―Έν•œλ‹€.