代码拉取完成,页面将自动刷新
package header
import "strings"
const (
DefaultUserAgent = "LOLL"
UserAgent = "User-Agent"
Location = "Location"
ContentType = "Content-Type"
PlainTextContentType = "text/plain; charset=utf-8"
JsonContentType = "application/json; charset=utf-8"
XmlContentType = "text/xml; charset=utf-8"
FormContentType = "application/x-www-form-urlencoded"
WwwAuthenticate = "WWW-Authenticate"
Authorization = "Authorization"
HeaderOderKey = "__header_order__"
PseudoHeaderOderKey = "__pseudo_header_order__"
)
var reqWriteExcludeHeader = map[string]bool{
// Host is :authority, already sent.
// Content-Length is automatic.
"host": true,
"content-length": true,
// Per 8.1.2.2 Connection-Specific Header
// Fields, don't send connection-specific
// fields. We have already checked if any
// are error-worthy so just ignore the rest.
"connection": true,
"proxy-connection": true,
"transfer-encoding": true,
"upgrade": true,
"keep-alive": true,
// Ignore header order keys which is only used internally.
HeaderOderKey: true,
PseudoHeaderOderKey: true,
}
func IsExcluded(key string) bool {
if reqWriteExcludeHeader[strings.ToLower(key)] {
return true
}
return false
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。