(해석 또는 이해가 잘못된 부분이 있다면 댓글로 편하게 알려주세요.)
Headers and methods work together to determine what clients and servers do. This section quickly sketches the purposes of the standard HTTP headers and some headers that are not explicitly defined in the HTTP/1.1 specification (RFC 2616). Appendix C summarizes all these headers in more detail.
헤더와 메소드는 함께 동작하며 클라이언트와 서버가 수행할 역할을 결정합니다.
이번 섹션에서는 표준 HTTP 헤더와 HTTP/1.1 명세(RFC 2616)에 명시되지 않은 몇 가지 헤더의 목적에 대해 정리합니다.
Appendix C는 이러한 모든 헤더들을 자세히 요약하고 있습니다.
There are headers that are specific for each type of message and headers that are more general in purpose, providing information in both request and response messages. Headers fall into five main classes:
헤더에는 메시지의 유형에 따른 구체적인 것도 있고, 요청과 응답 메시지 모두에서 정보를 전달하기 위한 일반적인 것도 있습니다.
헤더는 크게 다섯 가지로 분류됩니다.
General headers
These are generic headers used by both clients and servers. They serve general purposes that are useful for clients, servers, and other applications to supply to one another. For example, the Date header is a general-purpose header that allows both sides to indicate the time and date at which the message was constructed:
Date: Tue, 3 Oct 1974 02:16:00 GMT
Date : Tue, 3 Oct 1974 02:16:00 GMT
Request headers
As the name implies, request headers are specific to request messages. They provide extra information to servers, such as what type of data the client is willing to receive. For example, the following Accept header tells the server that the client will accept any media type that matches its request:
Accept: */*
Accept: */*
Response headers
Response messages have their own set of headers that provide information to the client (e.g., what type of server the client is talking to). For example, the following Server header tells the client that it is talking to a Version 1.0 Tiki-Hut server:
Server: Tiki-Hut/1.0
Server: Tiki-Hut/1.0
Entity headers
Entity headers refer to headers that deal with the entity body. For instance, entity headers can tell the type of the data in the entity body. For example, the following Content-Type header lets the application know that the data is an HTML document in the iso-latin-1 character set:
Content-Type: text/html; charset=iso-latin-1
Content-Type: text/html; charset=iso-latin-1
Extension headers
Extension headers are nonstandard headers that have been created by application developers but not yet added to the sanctioned HTTP specification. HTTP programs need to tolerate and forward extension headers, even if they don’t know what the headers mean.
Some headers provide very basic information about a message. These headers are called general headers. They are the fence straddlers, supplying useful information about a message regardless of its type.
일부 헤더는 메시지에 대해 아주 기본적인 정보를 제공합니다.
이러한 헤더를 범용 헤더라고 부릅니다.
범용 헤더는 메시지의 유형과 관계없이 메시지에 관한 유용한 정보를 공급합니다.
For example, whether you are constructing a request message or a response message, the date and time the message is created means the same thing, so the header that provides this kind of information is general to both types of messages. Table 3-11 lists the general informational headers.
예를 들어 요청 메시지나 응답 메시지를 작성할 때, 메시지가 생성된 날짜와 시간은 동일한 의미를 가집니다. 따라서 이러한 종류의 정보를 제공하는 헤더는 메시지의 두 가지 유형에서 모두 범용적으로 사용됩니다.
Table 3-11은 범용 헤더를 나열한 것입니다.
HTTP/1.0 introduced the first headers that allowed HTTP applications to cache local copies of objects instead of always fetching them directly from the origin server. The latest version of HTTP has a very rich set of cache parameters. In Chapter 7, we cover caching in depth. Table 3-12 lists the basic caching headers.
HTTP/1.0은 HTTP 응용 프로그램이 항상 origin 서버에서 직접 객체를 가져오지 않고 객체의 지역 복사본을 저장하도록 하는 첫 번째 헤더를 소개했습니다.
HTTP의 최신 버전에서는 cache 파라미터 집합이 다소 풍부해졌습니다.
캐싱에 대해서는 Chapter 7에서 깊이 있게 다룹니다.
Table 3-12는 기본적인 캐싱 헤더를 나열합니다.
그저께부터 갑자기 바빠져서 벨로그 포스팅을 해야 한다는 걸 까맣게 잊고 있었다.... 요즘 새로운 프로젝트를 준비하면서 이래저래 정리할 것이 많다. 새 프로젝트는 항상 마음이 설레고 들뜨는 것 같다. 그렇다고 원래 해오던 일을 내팽개치면 안 되는 거니까, 조금만 더 부지런히 움직여서 포스팅도 꼭 까먹지 말고 올려야겠다.
오늘은 헤더의 앞부분만 맛보기를 한 거라 내용이 많지도 어렵지도 않았다. 다음 포스팅과 다다음 포스팅에서 다룰 요청 헤더와 응답 헤더까지 무사히 잘 읽어낼 수 있기를 바란다. 그러면 Chapter 3도 끝이다!