什么是HTTP iehttpheaders找不到s

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
您的访问请求被拒绝 403 Forbidden - ITeye技术社区
您的访问请求被拒绝
亲爱的会员,您的IP地址所在网段被ITeye拒绝服务,这可能是以下两种情况导致:
一、您所在的网段内有网络爬虫大量抓取ITeye网页,为保证其他人流畅的访问ITeye,该网段被ITeye拒绝
二、您通过某个代理服务器访问ITeye网站,该代理服务器被网络爬虫利用,大量抓取ITeye网页
请您点击按钮解除封锁&二次元同好交流新大陆
扫码下载App
汇聚2000万达人的兴趣社区下载即送20张免费照片冲印
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(5611)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_081065',
blogTitle:'HTTP Headers状态码(status)主要字段属性详解GET,POST,HEAD',
blogAbstract:'firebug和fiddler查看到HTTP Headers,三种最常见的请求类型是:GET,POST 和 HEAD ,
GET:获取一个文档
大部分被传输到浏览器的html,images,js,css, … 都是通过GET方法发出请求的。它是获取数据的主要方法。
例如,要获取Nettuts+ 的文章,http request的第一行通常看起来是这样的:
GET /tutorials/other/top-20-mysql-best-practices/ HTTP/1.1
一旦html加载完成,浏览器将会发送GET 请求去获取图片,就像下面这样:
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:5,
publishTime:6,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'0',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}3.7.1 发送HTTP头部
本文所属图书&>&
本书是阿里巴巴资深Nginx技术专家呕心沥血之作,是作者多年的经验结晶,也是目前市场上唯一一本通过还原Nginx设计思想,剖析Nginx架构来帮助读者快速高效开发HTTP模块的图书。本书首先通过介绍官方Nginx的基本用...&&
3.7 发送响应
请求处理完毕后,需要向用户发送HTTP响应,告知客户端Nginx的执行结果。HTTP响应主要包括响应行、响应头部、包体三部分。发送HTTP响应时需要执行发送HTTP头部(发送HTTP头部时也会发送响应行)和发送HTTP包体两步操作。本节将以发送经典的&Hello World&为例来说明如何发送响应。
3.7.1 发送HTTP头部
下面看一下HTTP框架提供的发送HTTP头部的方法,如下所示。
ngx_int_t ngx_http_send_header(ngx_http_request_t *r);
调用ngx_http_send_header时把ngx_http_request_t对象传给它即可,而ngx_http_request_t的返回值是多样的,在本节中,可以认为返回NGX_ERROR或返回值大于0就表示不正常,例如:
ngx_int_t& rc = ngx_http_send_header(r);
if (rc == NGX_ERROR || rc & NGX_OK || r-&header_only) {
下面介绍设置响应中的HTTP头部的过程。
如同headers_in,ngx_http_request_t也有一个headers_out成员,用来设置响应中的HTTP头部,如下所示。
struct ngx_http_request_s {
&&& ngx_http_headers_in_t&&&&&&&&&&&& headers_
&&& ngx_http_headers_out_t&&&&&&&&&&& headers_
只要指定headers_out中的成员,就可以在调用ngx_http_send_header时正确地把HTTP头部发出。下面介绍headers_out的结构类型ngx_http_headers_out_t。
typedef struct {
&&& //待发送的HTTP头部链表,与headers_in中的headers成员类似
&&& ngx_list_t&&&&&&&&&&&&&&&&&&&&&&&
&&& /*响应中的状态值,如200表示成功。这里可以使用3.6.1节中介绍过的各个宏,如NGX_HTTP_OK */
&&& ngx_uint_t&&&&&&&&&&&&&&&&&&&&&&&
&&& //响应的状态行,如&HTTP/1.1 201 CREATED&
&&& ngx_str_t&&&&&&&&&&&&&&&&&&&&&&&& status_
&&& /*以下成员(包括ngx_table_elt_t)都是RFC1616规范中定义的HTTP头部,设置后,ngx_http_header_filter_module过滤模块可以把它们加到待发送的网络包中*/
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *content_
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *content_
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *last_
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *content_
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *accept_
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *www_
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *
&&& ngx_table_elt_t&&&&&&&&&&&&&&&&& *
&&& ngx_str_t&&&&&&&&&&&&&&&&&&&&&&& *override_
&&& /*可以调用ngx_http_set_content_type(r)方法帮助我们设置Content-Type头部,这个方法会根据URI中的文件扩展名并对应着mime.type来设置Content-Type值*/
&&& size_t&&&&&&&&&&&&&&&&&&&&&&&&&&& content_type_
&&& ngx_str_t&&&&&&&&&&&&&&&&&&&&&&&& content_
&&& ngx_str_t&&&&&&&&&&&&&&&&&&&&&&&&
&&& u_char&&&&&&&&&&&&&&&&&&&&&&&&&& *content_type_
&&& ngx_uint_t&&&&&&&&&&&&&&&&&&&&&&& content_type_
&&& ngx_array_t&&&&&&&&&&&&&&&&&&&&&& cache_
&&& /*在这里指定过content_length_n后,不用再次到ngx_table_elt_t *content_ length中设置响应长度*/
&&& off_t&&&&&&&&&&&&&&&&&&&&&&&&&&&& content_length_n;
&&& time_t&&&&&&&&&&&&&&&&&&&&&&&&&&& date_
&&& time_t&&&&&&&&&&&&&&&&&&&&&&&&&&& last_modified_
} ngx_http_headers_out_t;
在向headers链表中添加自定义的HTTP头部时,可以参考3.2.3节中ngx_list_push的使用方法。这里有一个简单的例子,如下所示。
ngx_table_elt_t* h = ngx_list_push(&r-&headers_out.headers);
if (h == NULL) {
&return NGX_ERROR;
h-&hash = 1;
h-&key.len = sizeof(&TestHead&) - 1;
h-&key.data = (u_char *) &TestHead&;
h-&value.len = sizeof(&TestValue&) - 1;
h-&value.data = (u_char *) &TestValue&;
这样将会在响应中新增一行HTTP头部:
TestHead: TestValud\r\n
如果发送的是一个不含有HTTP包体的响应,这时就可以直接结束请求了(例如,在ngx_http_mytest_handler方法中,直接在ngx_http_send_header方法执行后将其返回值return即可)。
注意 ngx_http_send_header方法会首先调用所有的HTTP过滤模块共同处理headers_out中定义的HTTP响应头部,全部处理完毕后才会序列化为TCP字符流发送到客户端,相关流程可参见11.9.1节。
您对本文章有什么意见或着疑问吗?请到您的关注和建议是我们前行的参考和动力&&
您的浏览器不支持嵌入式框架,或者当前配置为不显示嵌入式框架。什么是HTTP Headers_百度知道
什么是HTTP Headers
提问者采纳
//net, publicContent-Type: LiteSpeedConnection.tutsplus,空行完了就开始输出内容了(在这个案例中是一些html输出).8/xmlrpc: Accept-Encoding:36: &quot!-- ;,例如图片, 28 Nov 2009 03: closeX-Powered-By, Cookie:50: http。这个HTTP请求也发出了一些其它资源的接收请求。请求完成之后
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁HttpHeaders (Spring Framework 4.2.6.RELEASE API)
JavaScript is disabled on your browser.
Spring Framework
Class HttpHeaders
org.springframework.http.HttpHeaders
All Implemented Interfaces:
, &,&&&, &,&
Direct Known Subclasses:
public class HttpHeaders
implements &,&,
Represents HTTP request and response headers, mapping string header names to a list of string values.
In addition to the normal methods defined by , this class offers the following
convenience methods:
returns the first value associated with a given header name
adds a header value to the list of values for a header name
sets the header value to a single string value
Inspired by com.sun.net.httpserver.Headers.
Arjen Poutsma, Sebastien Deleuze
Nested Class Summary
Nested classes/interfaces inherited from interface&java.util.
Field Summary
Modifier and Type
Field and Description
The HTTP Accept header field name.
The HTTP Accept-Charset header field name.
The HTTP Accept-Encoding header field name.
The HTTP Accept-Language header field name.
The HTTP Accept-Ranges header field name.
The CORS Access-Control-Allow-Credentials response header field name.
The CORS Access-Control-Allow-Headers response header field name.
The CORS Access-Control-Allow-Methods response header field name.
The CORS Access-Control-Allow-Origin response header field name.
The CORS Access-Control-Expose-Headers response header field name.
The CORS Access-Control-Max-Age response header field name.
The CORS Access-Control-Request-Headers request header field name.
The CORS Access-Control-Request-Method request header field name.
The HTTP Age header field name.
The HTTP Allow header field name.
The HTTP Authorization header field name.
The HTTP Cache-Control header field name.
The HTTP Connection header field name.
The HTTP Content-Disposition header field name
The HTTP Content-Encoding header field name.
The HTTP Content-Language header field name.
The HTTP Content-Length header field name.
The HTTP Content-Location header field name.
The HTTP Content-Range header field name.
The HTTP Content-Type header field name.
The HTTP Cookie header field name.
The HTTP Date header field name.
The HTTP ETag header field name.
The HTTP Expect header field name.
The HTTP Expires header field name.
The HTTP From header field name.
The HTTP Host header field name.
The HTTP If-Match header field name.
The HTTP If-Modified-Since header field name.
The HTTP If-None-Match header field name.
The HTTP If-Range header field name.
The HTTP If-Unmodified-Since header field name.
The HTTP Last-Modified header field name.
The HTTP Link header field name.
The HTTP Location header field name.
The HTTP Max-Forwards header field name.
The HTTP Origin header field name.
The HTTP Pragma header field name.
The HTTP Proxy-Authenticate header field name.
The HTTP Proxy-Authorization header field name.
The HTTP Range header field name.
The HTTP Referer header field name.
The HTTP Retry-After header field name.
The HTTP Server header field name.
The HTTP Set-Cookie header field name.
The HTTP Set-Cookie2 header field name.
The HTTP TE header field name.
The HTTP Trailer header field name.
The HTTP Transfer-Encoding header field name.
The HTTP Upgrade header field name.
The HTTP User-Agent header field name.
The HTTP Vary header field name.
The HTTP Via header field name.
The HTTP Warning header field name.
The HTTP WWW-Authenticate header field name.
Constructor Summary
Constructors&
Constructor and Description
Constructs a new, empty instance of the HttpHeaders object.
Method Summary
All Methods&&&&
Modifier and Type
Method and Description
(&headerName,
&headerValue)
Add the given, single header value under the given name.
Return the list of acceptable ,
as specified by the Accept header.
Return the list of acceptable ,
as specified by the Accept-Charset header.
Returns the value of the Access-Control-Allow-Credentials response header.
Returns the value of the Access-Control-Allow-Headers response header.
Return the value of the Access-Control-Allow-Methods response header.
Return the value of the Access-Control-Allow-Origin response header.
Returns the value of the Access-Control-Expose-Headers response header.
Returns the value of the Access-Control-Max-Age response header.
Returns the value of the Access-Control-Request-Headers request header.
Return the value of the Access-Control-Request-Method request header.
Return the set of allowed ,
as specified by the Allow header.
Return the value of the Cache-Control header.
Return the value of the Connection header.
Return the length of the body in bytes, as specified by the
Content-Length header.
Return the
of the body, as specified
by the Content-Type header.
Return the date and time at which the message was created, as specified
by the Date header.
Return the entity tag of the body, as specified by the ETag header.
Return the date and time at which the message is no longer valid,
as specified by the Expires header.
(&headerName)
Return the first header value for the given header name, if any.
(&headerName)
Parse the first header value for the given header name as a date,
return -1 if there is no value, or raise
if the value cannot be parsed as a date.
protected &&
(&header)&
Return the value of the If-Modified-Since header.
Return the value of the If-None-Match header.
Return the time the resource was last changed, as specified by the
Last-Modified header.
Return the (new) location of a resource
as specified by the Location header.
Return the value of the Origin header.
Return the value of the Pragma header.
Return the value of the Range header.
Return the value of the Upgrade header.
&&&value)&
(&? extends ,? extends &&&&map)&
(&headers)
Return a HttpHeaders object that can only be read, not written to.
(&headerName,
&headerValue)
Set the given, single header value under the given name.
(&&&acceptableMediaTypes)
Set the list of acceptable ,
as specified by the Accept header.
(&&&acceptableCharsets)
Set the list of acceptable ,
as specified by the Accept-Charset header.
(boolean&allowCredentials)
Set the (new) value of the Access-Control-Allow-Credentials response header.
(&&&allowedHeaders)
Set the (new) value of the Access-Control-Allow-Headers response header.
(&&&allowedMethods)
Set the (new) value of the Access-Control-Allow-Methods response header.
(&allowedOrigin)
Set the (new) value of the Access-Control-Allow-Origin response header.
(&&&exposedHeaders)
Set the (new) value of the Access-Control-Expose-Headers response header.
(long&maxAge)
Set the (new) value of the Access-Control-Max-Age response header.
(&&&requestHeaders)
Set the (new) value of the Access-Control-Request-Headers request header.
(&requestedMethod)
Set the (new) value of the Access-Control-Request-Method request header.
(&,&&values)
Set the given values under.
(&&&allowedMethods)
Set the set of allowed ,
as specified by the Allow header.
(&cacheControl)
Set the (new) value of the Cache-Control header.
(&&&connection)
Set the (new) value of the Connection header.
(&connection)
Set the (new) value of the Connection header.
&filename)
Set the (new) value of the Content-Disposition header
for form-data.
(long&contentLength)
Set the length of the body in bytes, as specified by the
Content-Length header.
(&mediaType)
of the body,
as specified by the Content-Type header.
(long&date)
Set the date and time at which the message was created, as specified
by the Date header.
(&headerName,
long&date)
Set the given date under the given header name after formatting it as a string
using the pattern "EEE, dd MMM yyyy HH:mm:ss zzz".
Set the (new) entity tag of the body, as specified by the ETag header.
(long&expires)
Set the date and time at which the message is no longer valid,
as specified by the Expires header.
(long&ifModifiedSince)
Set the (new) value of the If-Modified-Since header.
(&&&ifNoneMatchList)
Set the (new) values of the If-None-Match header.
(&ifNoneMatch)
Set the (new) value of the If-None-Match header.
(long&lastModified)
Set the time the resource was last changed, as specified by the
Last-Modified header.
(&location)
Set the (new) location of a resource,
as specified by the Location header.
Set the (new) value of the Origin header.
Set the (new) value of the Pragma header.
(&&&ranges)
Sets the (new) value of the Range header.
(&upgrade)
Set the (new) value of the Upgrade header.
(&&&list)&
Returns the first values contained in this MultiValueMap.
Methods inherited from class&java.lang.
, , , , , , ,
Methods inherited from interface&java.util.
, , , , , , , , , ,
Field Detail
public static final& ACCEPT
The HTTP Accept header field name.
ACCEPT_CHARSET
public static final& ACCEPT_CHARSET
The HTTP Accept-Charset header field name.
ACCEPT_ENCODING
public static final& ACCEPT_ENCODING
The HTTP Accept-Encoding header field name.
ACCEPT_LANGUAGE
public static final& ACCEPT_LANGUAGE
The HTTP Accept-Language header field name.
ACCEPT_RANGES
public static final& ACCEPT_RANGES
The HTTP Accept-Ranges header field name.
ACCESS_CONTROL_ALLOW_CREDENTIALS
public static final& ACCESS_CONTROL_ALLOW_CREDENTIALS
The CORS Access-Control-Allow-Credentials response header field name.
ACCESS_CONTROL_ALLOW_HEADERS
public static final& ACCESS_CONTROL_ALLOW_HEADERS
The CORS Access-Control-Allow-Headers response header field name.
ACCESS_CONTROL_ALLOW_METHODS
public static final& ACCESS_CONTROL_ALLOW_METHODS
The CORS Access-Control-Allow-Methods response header field name.
ACCESS_CONTROL_ALLOW_ORIGIN
public static final& ACCESS_CONTROL_ALLOW_ORIGIN
The CORS Access-Control-Allow-Origin response header field name.
ACCESS_CONTROL_EXPOSE_HEADERS
public static final& ACCESS_CONTROL_EXPOSE_HEADERS
The CORS Access-Control-Expose-Headers response header field name.
ACCESS_CONTROL_MAX_AGE
public static final& ACCESS_CONTROL_MAX_AGE
The CORS Access-Control-Max-Age response header field name.
ACCESS_CONTROL_REQUEST_HEADERS
public static final& ACCESS_CONTROL_REQUEST_HEADERS
The CORS Access-Control-Request-Headers request header field name.
ACCESS_CONTROL_REQUEST_METHOD
public static final& ACCESS_CONTROL_REQUEST_METHOD
The CORS Access-Control-Request-Method request header field name.
public static final& AGE
The HTTP Age header field name.
public static final& ALLOW
The HTTP Allow header field name.
AUTHORIZATION
public static final& AUTHORIZATION
The HTTP Authorization header field name.
CACHE_CONTROL
public static final& CACHE_CONTROL
The HTTP Cache-Control header field name.
CONNECTION
public static final& CONNECTION
The HTTP Connection header field name.
CONTENT_ENCODING
public static final& CONTENT_ENCODING
The HTTP Content-Encoding header field name.
CONTENT_DISPOSITION
public static final& CONTENT_DISPOSITION
The HTTP Content-Disposition header field name
CONTENT_LANGUAGE
public static final& CONTENT_LANGUAGE
The HTTP Content-Language header field name.
CONTENT_LENGTH
public static final& CONTENT_LENGTH
The HTTP Content-Length header field name.
CONTENT_LOCATION
public static final& CONTENT_LOCATION
The HTTP Content-Location header field name.
CONTENT_RANGE
public static final& CONTENT_RANGE
The HTTP Content-Range header field name.
CONTENT_TYPE
public static final& CONTENT_TYPE
The HTTP Content-Type header field name.
public static final& COOKIE
The HTTP Cookie header field name.
public static final& DATE
The HTTP Date header field name.
public static final& ETAG
The HTTP ETag header field name.
public static final& EXPECT
The HTTP Expect header field name.
public static final& EXPIRES
The HTTP Expires header field name.
public static final& FROM
The HTTP From header field name.
public static final& HOST
The HTTP Host header field name.
public static final& IF_MATCH
The HTTP If-Match header field name.
IF_MODIFIED_SINCE
public static final& IF_MODIFIED_SINCE
The HTTP If-Modified-Since header field name.
IF_NONE_MATCH
public static final& IF_NONE_MATCH
The HTTP If-None-Match header field name.
public static final& IF_RANGE
The HTTP If-Range header field name.
IF_UNMODIFIED_SINCE
public static final& IF_UNMODIFIED_SINCE
The HTTP If-Unmodified-Since header field name.
LAST_MODIFIED
public static final& LAST_MODIFIED
The HTTP Last-Modified header field name.
public static final& LINK
The HTTP Link header field name.
public static final& LOCATION
The HTTP Location header field name.
MAX_FORWARDS
public static final& MAX_FORWARDS
The HTTP Max-Forwards header field name.
public static final& ORIGIN
The HTTP Origin header field name.
public static final& PRAGMA
The HTTP Pragma header field name.
PROXY_AUTHENTICATE
public static final& PROXY_AUTHENTICATE
The HTTP Proxy-Authenticate header field name.
PROXY_AUTHORIZATION
public static final& PROXY_AUTHORIZATION
The HTTP Proxy-Authorization header field name.
public static final& RANGE
The HTTP Range header field name.
public static final& REFERER
The HTTP Referer header field name.
RETRY_AFTER
public static final& RETRY_AFTER
The HTTP Retry-After header field name.
public static final& SERVER
The HTTP Server header field name.
SET_COOKIE
public static final& SET_COOKIE
The HTTP Set-Cookie header field name.
SET_COOKIE2
public static final& SET_COOKIE2
The HTTP Set-Cookie2 header field name.
public static final& TE
The HTTP TE header field name.
public static final& TRAILER
The HTTP Trailer header field name.
TRANSFER_ENCODING
public static final& TRANSFER_ENCODING
The HTTP Transfer-Encoding header field name.
public static final& UPGRADE
The HTTP Upgrade header field name.
USER_AGENT
public static final& USER_AGENT
The HTTP User-Agent header field name.
public static final& VARY
The HTTP Vary header field name.
public static final& VIA
The HTTP Via header field name.
public static final& WARNING
The HTTP Warning header field name.
WWW_AUTHENTICATE
public static final& WWW_AUTHENTICATE
The HTTP WWW-Authenticate header field name.
Constructor Detail
HttpHeaders
public&HttpHeaders()
Constructs a new, empty instance of the HttpHeaders object.
Method Detail
public&void&setAccept(&&&acceptableMediaTypes)
Set the list of acceptable ,
as specified by the Accept header.
public&&&&getAccept()
Return the list of acceptable ,
as specified by the Accept header.
Returns an empty list when the acceptable media types are unspecified.
setAccessControlAllowCredentials
public&void&setAccessControlAllowCredentials(boolean&allowCredentials)
Set the (new) value of the Access-Control-Allow-Credentials response header.
getAccessControlAllowCredentials
public&boolean&getAccessControlAllowCredentials()
Returns the value of the Access-Control-Allow-Credentials response header.
setAccessControlAllowHeaders
public&void&setAccessControlAllowHeaders(&&&allowedHeaders)
Set the (new) value of the Access-Control-Allow-Headers response header.
getAccessControlAllowHeaders
public&&&&getAccessControlAllowHeaders()
Returns the value of the Access-Control-Allow-Headers response header.
setAccessControlAllowMethods
public&void&setAccessControlAllowMethods(&&&allowedMethods)
Set the (new) value of the Access-Control-Allow-Methods response header.
getAccessControlAllowMethods
public&&&&getAccessControlAllowMethods()
Return the value of the Access-Control-Allow-Methods response header.
setAccessControlAllowOrigin
public&void&setAccessControlAllowOrigin(&allowedOrigin)
Set the (new) value of the Access-Control-Allow-Origin response header.
getAccessControlAllowOrigin
public&&getAccessControlAllowOrigin()
Return the value of the Access-Control-Allow-Origin response header.
setAccessControlExposeHeaders
public&void&setAccessControlExposeHeaders(&&&exposedHeaders)
Set the (new) value of the Access-Control-Expose-Headers response header.
getAccessControlExposeHeaders
public&&&&getAccessControlExposeHeaders()
Returns the value of the Access-Control-Expose-Headers response header.
setAccessControlMaxAge
public&void&setAccessControlMaxAge(long&maxAge)
Set the (new) value of the Access-Control-Max-Age response header.
getAccessControlMaxAge
public&long&getAccessControlMaxAge()
Returns the value of the Access-Control-Max-Age response header.
Returns -1 when the max age is unknown.
setAccessControlRequestHeaders
public&void&setAccessControlRequestHeaders(&&&requestHeaders)
Set the (new) value of the Access-Control-Request-Headers request header.
getAccessControlRequestHeaders
public&&&&getAccessControlRequestHeaders()
Returns the value of the Access-Control-Request-Headers request header.
setAccessControlRequestMethod
public&void&setAccessControlRequestMethod(&requestedMethod)
Set the (new) value of the Access-Control-Request-Method request header.
getAccessControlRequestMethod
public&&getAccessControlRequestMethod()
Return the value of the Access-Control-Request-Method request header.
setAcceptCharset
public&void&setAcceptCharset(&&&acceptableCharsets)
Set the list of acceptable ,
as specified by the Accept-Charset header.
getAcceptCharset
public&&&&getAcceptCharset()
Return the list of acceptable ,
as specified by the Accept-Charset header.
public&void&setAllow(&&&allowedMethods)
Set the set of allowed ,
as specified by the Allow header.
public&&&&getAllow()
Return the set of allowed ,
as specified by the Allow header.
Returns an empty set when the allowed methods are unspecified.
setCacheControl
public&void&setCacheControl(&cacheControl)
Set the (new) value of the Cache-Control header.
getCacheControl
public&&getCacheControl()
Return the value of the Cache-Control header.
setConnection
public&void&setConnection(&connection)
Set the (new) value of the Connection header.
setConnection
public&void&setConnection(&&&connection)
Set the (new) value of the Connection header.
getConnection
public&&&&getConnection()
Return the value of the Connection header.
setContentDispositionFormData
public&void&setContentDispositionFormData(&name,
&filename)
Set the (new) value of the Content-Disposition header
for form-data.
Parameters:
name - the control name
filename - the filename (may be null)
setContentLength
public&void&setContentLength(long&contentLength)
Set the length of the body in bytes, as specified by the
Content-Length header.
getContentLength
public&long&getContentLength()
Return the length of the body in bytes, as specified by the
Content-Length header.
Returns -1 when the content-length is unknown.
setContentType
public&void&setContentType(&mediaType)
of the body,
as specified by the Content-Type header.
getContentType
public&&getContentType()
Return the
of the body, as specified
by the Content-Type header.
Returns null when the content-type is unknown.
public&void&setDate(long&date)
Set the date and time at which the message was created, as specified
by the Date header.
The date should be specified as the number of milliseconds since
January 1, 1970 GMT.
public&long&getDate()
Return the date and time at which the message was created, as specified
by the Date header.
The date is returned as the number of milliseconds since
January 1, 1970 GMT. Returns -1 when the date is unknown.
- if the value can't be converted to a date
public&void&setETag(&eTag)
Set the (new) entity tag of the body, as specified by the ETag header.
public&&getETag()
Return the entity tag of the body, as specified by the ETag header.
setExpires
public&void&setExpires(long&expires)
Set the date and time at which the message is no longer valid,
as specified by the Expires header.
The date should be specified as the number of milliseconds since
January 1, 1970 GMT.
getExpires
public&long&getExpires()
Return the date and time at which the message is no longer valid,
as specified by the Expires header.
The date is returned as the number of milliseconds since
January 1, 1970 GMT. Returns -1 when the date is unknown.
setIfModifiedSince
public&void&setIfModifiedSince(long&ifModifiedSince)
Set the (new) value of the If-Modified-Since header.
The date should be specified as the number of milliseconds since
January 1, 1970 GMT.
getIfModifiedSince
public&long&getIfModifiedSince()
Return the value of the If-Modified-Since header.
The date is returned as the number of milliseconds since
January 1, 1970 GMT. Returns -1 when the date is unknown.
setIfNoneMatch
public&void&setIfNoneMatch(&ifNoneMatch)
Set the (new) value of the If-None-Match header.
setIfNoneMatch
public&void&setIfNoneMatch(&&&ifNoneMatchList)
Set the (new) values of the If-None-Match header.
toCommaDelimitedString
protected&&toCommaDelimitedString(&&&list)
getIfNoneMatch
public&&&&getIfNoneMatch()
Return the value of the If-None-Match header.
getFirstValueAsList
protected&&&&getFirstValueAsList(&header)
setLastModified
public&void&setLastModified(long&lastModified)
Set the time the resource was last changed, as specified by the
Last-Modified header.
The date should be specified as the number of milliseconds since
January 1, 1970 GMT.
getLastModified
public&long&getLastModified()
Return the time the resource was last changed, as specified by the
Last-Modified header.
The date is returned as the number of milliseconds since
January 1, 1970 GMT. Returns -1 when the date is unknown.
setLocation
public&void&setLocation(&location)
Set the (new) location of a resource,
as specified by the Location header.
getLocation
public&&getLocation()
Return the (new) location of a resource
as specified by the Location header.
Returns null when the location is unknown.
public&void&setOrigin(&origin)
Set the (new) value of the Origin header.
public&&getOrigin()
Return the value of the Origin header.
public&void&setPragma(&pragma)
Set the (new) value of the Pragma header.
public&&getPragma()
Return the value of the Pragma header.
public&void&setRange(&&&ranges)
Sets the (new) value of the Range header.
public&&&&getRange()
Return the value of the Range header.
Returns an empty list when the range is unknown.
setUpgrade
public&void&setUpgrade(&upgrade)
Set the (new) value of the Upgrade header.
getUpgrade
public&&getUpgrade()
Return the value of the Upgrade header.
getFirstDate
public&long&getFirstDate(&headerName)
Parse the first header value for the given header name as a date,
return -1 if there is no value, or raise
if the value cannot be parsed as a date.
Parameters:
headerName - the header name
the parsed date header, or -1 if none
public&void&setDate(&headerName,
long&date)
Set the given date under the given header name after formatting it as a string
using the pattern "EEE, dd MMM yyyy HH:mm:ss zzz". The equivalent of
but for date headers.
public&&getFirst(&headerName)
Return the first header value for the given header name, if any.
Specified by:
&in interface&&,&
Parameters:
headerName - the header name
the first header value, or null if none
public&void&add(&headerName,
&headerValue)
Add the given, single header value under the given name.
Specified by:
&in interface&&,&
Parameters:
headerName - the header name
headerValue - the header value
- if adding headers is not supported
public&void&set(&headerName,
&headerValue)
Set the given, single header value under the given name.
Specified by:
&in interface&&,&
Parameters:
headerName - the header name
headerValue - the header value
- if adding headers is not supported
public&void&setAll(&,&&values)
Description copied from interface:&
Set the given values under.
Specified by:
&in interface&&,&
Parameters:
values - the values.
toSingleValueMap
public&&,&&toSingleValueMap()
Description copied from interface:&
Returns the first values contained in this MultiValueMap.
Specified by:
&in interface&&,&
a single value representation of this map
public&int&size()
Specified by:
&in interface&&,&&&
public&boolean&isEmpty()
Specified by:
&in interface&&,&&&
containsKey
public&boolean&containsKey(&key)
Specified by:
&in interface&&,&&&
containsValue
public&boolean&containsValue(&value)
Specified by:
&in interface&&,&&&
public&&&&get(&key)
Specified by:
&in interface&&,&&&
public&&&&put(&key,
Specified by:
&in interface&&,&&&
public&&&&remove(&key)
Specified by:
&in interface&&,&&&
public&void&putAll(&? extends ,? extends &&&&map)
Specified by:
&in interface&&,&&&
public&void&clear()
Specified by:
&in interface&&,&&&
public&&&&keySet()
Specified by:
&in interface&&,&&&
public&&&&&&values()
Specified by:
&in interface&&,&&&
public&&&,&&&&&entrySet()
Specified by:
&in interface&&,&&&
public&boolean&equals(&other)
Specified by:
&in interface&&,&&&
Overrides:
&in class&
public&int&hashCode()
Specified by:
&in interface&&,&&&
Overrides:
&in class&
public&&toString()
Overrides:
&in class&
readOnlyHttpHeaders
public static&&readOnlyHttpHeaders(&headers)
Return a HttpHeaders object that can only be read, not written to.
Spring Framework

我要回帖

更多关于 live http headers 的文章

 

随机推荐