HTTP 学习笔记------2

多种数据的多部分对象集合

multipart/form-data

web表单文件上传

multipart/byteranges

状态码206 包含多个范围内容

GET /z4d4kWk.jpg HTTP/1.1
Host: i.imgur.com
Range: bytes=0-100,100-200
HTTP/1.1 206 Partial Content
Content-Type: multipart/byteranges; boundary=3d6b6a416f9b5
Content-Length: 282

--3d6b6a416f9b5
Content-Type: text/html
Content-Range: bytes 0-50/1270

<!doctype html>
<html>
<head>
    <title>Example Do
--3d6b6a416f9b5
Content-Type: text/html
Content-Range: bytes 100-150/1270

eta http-equiv="Content-type" content="text/html; c
--3d6b6a416f9b5--

状态码

204 no Content

206 partial Content 范围请求

301 moved permanently 永久重定向

302 found  临时重定向

303  类似302,强调get方法

304 not  modified  不满足条件的请求

400 bad request 无法理解这个请求

401 需要认证

403 forbidden  拒绝响应

500 服务器错误

503 服务不可用

首部字段

   请求首部

  Accept: text/plain;q=0.3,text/html  支持的类型

 accept-charset:  iso-8859-5   支持的字符集

Accept-Encoding: gzip,deflate  支持的内容编码

accept-Language: zh-cn  支持的语言

authorization:认证信息

host:域名

range: bytes=5001-10000 范围请求

referer: 请求的原始uri

user-Agent  浏览器种类

    响应首部地段:       

accept-Ranges: none/bytes  是否接受range

Etagere:“42244-fsa-fdsaf "   实体标示       

location:  重定向地址     

retry-after: 120

实体首部字段

allow:get ,head

Content_encoding:  gzip

content-length: 15000  主体大小

content-Location: 重定向大小

Content-MD5:

content-Range : bytes 5001-100000/100000  发送的部分

content-Type: text/html;charset=UTF-8

expires:过期时间

last-Modified: 最后修改时间

Cookie相关

set-Cookie:status=enable;expires=时间

set-cookie字段属性

name;

expires:

path:

domain=域名  cookie适用域名

secure:仅限https

httpOnly js无法获取cookie

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值