Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
7.2 HTTP 1.1 Response Headers and Their Meaning
153
Set Cookie
The
Set Cookie
header specifies a cookie associated with the page.
Each cookie requires a separate
Set Cookie
header. Servlets should not
use
response.setHeader("Set Cookie", ...)
, but instead should
use the special purpose
addCookie
method of
HttpServletResponse
.
For details, see Chapter 8 (Handling Cookies). Technically,
Set Cookie
is not part of HTTP 1.1. It was originally a Netscape extension but is now
very widely supported, including in both Netscape and Internet Explorer.
Trailer
This new and rarely used HTTP 1.1 header identifies the header fields
that are present in the trailer of a message that is sent with chunked
transfer coding. See Section 3.6 of the HTTP 1.1 specification (RFC
2616) for details. Recall that
http://www.rfc editor.org/
maintains
an up to date list of RFC archive sites.
Transfer Encoding
Supplying this header with a value of
chunked
indicates chunked
transfer coding. See Section 3.6 of the HTTP 1.1 specification (RFC
2616) for details.
Upgrade
This header is used when the client first uses the
Upgrade
request
header to ask the server to switch to one of several possible new proto
cols. If the server agrees, it sends a 101 (
Switching Protocols
) status
code and includes an
Upgrade
response header with the specific proto
col it is switching to. This protocol negotiation is usually carried on by
the server itself, not by a servlet.
Vary
This rarely used new HTTP 1.1 header tells the client which headers
can be used to determine if the response document can be cached.
Via
This header is used by gateways and proxies to list the intermediate sites
the request passed through. It is new in HTTP 1.1.
Warning
This new and rarely used catchall header lets you warn clients about
caching or content transformation errors.
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved