http協議以及http1.0和http1.1的區別

來源:互聯網
上載者:User

標籤:發送   flat   .com   content   origin   login   nec   log   cookie   

header回應標頭資訊:

HTTP/1.1 302 FOUNDContent-Length: 0Set-Cookie: sessionid=n3gozvqbjba1zckr7v0ccj6yn7v96oh8; expires=Tue, 21-Mar-2017 02:57:34 GMT; httponly; Max-Age=300; Path=/Vary: CookieServer: TornadoServer/4.3Location: http://jumpserver.i.beebank.com/X-Frame-Options: SAMEORIGINContent-Type: text/html; charset=utf-8

header要求標頭資訊:

POST /login/ HTTP/1.1Host: jumpserver.i.beebank.comConnection: keep-aliveContent-Length: 47Cache-Control: max-age=0Origin: http://jumpserver.i.beebank.comUpgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36Content-Type: application/x-www-form-urlencodedAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Referer: http://jumpserver.i.beebank.com/login/Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.8,en;q=0.6Cookie: csrftoken=VwENAPzCENfcXVmw6tCBjTvQ2d99n1jU; sessionid=pwk41j162z9yr6go4fi97zxnulmrrcfn

 

http1.0使用keep-alive告知server端需要建立一個長串連,而http1.1預設支援長串連;

http1.1一開始只發送header資訊,如果server返回200,表示有許可權訪問,然後才發送body資訊,如果server返回401,表示該請求沒有許可權,就不會發送body的資訊;

http1.1支援host域;

http協議以及http1.0和http1.1的區別

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.