深入Nginx之《HTTP请求报文与HTTP响应报文》连载
HTTP请求报文
这个很有必要了解,好歹我们得知道Nginx在提供HTTP服务时,客户端都会传些什么。HTTP请求中客户端传送的内容称为HTTP请求报文。
1、请求行包含:
请求方法,请求URL,HTTP协议及版本。其中请求方法和支持的协议版本包含如下:
GET,HEAD,POST 它们都支持HTTP1.0/1.1。
PUT,DELETE,CONNECT,OPTIONS,TRACE,PATCH 它们只支持HTTP1.1。
2、请求头部:
客户端向服务器传递请求时附加的一些信息,由key/value组成,key和value由冒号分隔,每行一对,请求头常见的key 有 Cookie,User_Agent, Accept-Encoding。
3、请求体:
一般是由POST方法提交,它可能是图片,文件,或者是字符串。
1.2 HTTP响应报文
这个仍然很有必要了解的,客户端得到了想要东东(有时候可能也得不到,如服务异常了),那里面包含了些什么。HTTP请求后返回给客户端的内容称为HTTP响应报文。
HTTP响应报文(服务器返回给客户端的内容)由三部分组成,它们分别是响应行,响应头,响应体。
响应行包含HTTP协议版本,状态码,状态码描述。
其中状态码的分类如下:
状态码 |
作用 |
1XX |
它表示请求已经被接受,正在继续处理,这种响应是临时响应,不会返回响应体。 |
2XX |
成功处理并返回,它表示在服务器内已经被接收,被知晓,并处理完成。 |
3XX |
重定向功能,告知客户端需要继续执行操作才可以完成请求。 |
4XX |
出现问题,和客户端有关系,比如401表示权限问题,404表示访问了一个不存在的URL。 |
5XX |
出现问题,和服务端有关,比如500表示内部错误,504表示请求超时。 |
响应头,为响应报文附加额外的信息,和请求头相似。区别在于它是返回给客户端,请求头部是从客户端发起。常见的响应头key如Content-Type,Content-Encoding。
响应体,请求返回到客户端的正文数据。
下面是一个完整的响应报文示例:
响应报文并非只有Nginx的后端服务器才能发送的,有些时候Nginx也可以作为服务器对请求报文的内容进行响应,比如return,echo等指令。
<a href="http://amoxicillindrug.com/">amoxicillin 500 mg discount</a> <a href="http://doxycyclinerem.com/">doxycycline prescription uk</a> <a href="http://avanapill.com/">best dapoxetine tablet in india</a> <a href="http://wellbutrinbupropionpill.com/">bupropion 100 mg cheapest</a> <a href="http://viagramn.com/">sildenafil 100mg generic</a> <a href="http://prednisoloneprednisone.com/">prednisolone 5mg tablets price</a> <a href="http://pharmviagra.com/">viagra for woman</a> <a href="http://saleviagra.com/">viagra tablet online india</a>
We are a bunch of volunteers and starting a new scheme in our community.
Your website provided us with valuable information to work on. You
have done a formidable job and our whole community might be grateful
to you.
We are a bunch of volunteers and starting a new scheme
in our community. Your website provided us with valuable information to work on. You have
done a formidable job and our whole community might be grateful to you.
<a href="https://saleviagra.com/">purchase viagra in australia</a> <a href="https://pharmviagra.com/">viagra script</a> <a href="https://viagrasupp.com/">sildenafil 25 mg daily</a> <a href="https://lyricamedication.com/">lyrica online uk</a> <a href="https://citamoxifen.com/">tamoxifen tablets for sale</a> <a href="https://bactrimotc.com/">where to buy bactrim</a>
<a href="http://lexaprossri.com/">where to buy brand name lexapro</a> <a href="http://viagra10x.com/">where can i buy viagra in usa</a> <a href="http://avanapill.com/">dapoxetine price australia</a> <a href="http://buytretinoinretina.com/">retin a 025 cream</a> <a href="http://inderalpropranolol.com/">propranolol inderal</a> <a href="http://viagrasupp.com/">cost of sildenafil 20 mg</a> <a href="http://ataraxhydroxyzine.com/">atarax for anxiety</a> <a href="http://saleviagra.com/">soft viagra</a>
<a href="http://amoxicillintrimox.com/">augmentin 875 mg buy</a> <a href="http://viagra10x.com/">viagra us</a> <a href="http://inderalpropranolol.com/">propranolol inderal la</a> <a href="http://ataraxhydroxyzine.com/">atarax medication generic</a>
<a href="https://viagrasupp.com/">generic female viagra 100mg</a> <a href="https://elitadalafil.com/">cheap cialis 40 mg</a> <a href="https://viagra10x.com/">buy viagra over the counter usa</a> <a href="https://opcialis.com/">us pharmacy cialis</a> <a href="https://ventolinmed.com/">1.25 mg albuterol</a> <a href="https://avodartpill.com/">avodart 90 capsules</a> <a href="https://hydrochlorothiazidepill.com/">hydrochlorothiazide 2mg</a>
<a href="http://paydayloansrc.com/">bad credit loan direct lenders</a> <a href="http://urglending.com/">long term payday loans</a> <a href="http://secloans.com/">loan approval</a> <a href="http://loandest.com/">immediate payday loans</a>
<a href="https://pskloans.com/">payday loan advance</a>
<a href="https://viagrasr.com/">cheap viagra</a> <a href="https://indocindrug.com/">indocin 25 mg capsule</a> <a href="https://zoviraxaciclovir.com/">can you buy zovirax over the counter in australia</a> <a href="https://ordviagra.com/">buy viagra generic canada</a> <a href="https://oipharmacy.com/">online pharmacy reddit</a>
<a href="https://amoxicillintrimox.com/">order augmentin online</a> <a href="https://saleviagra.com/">sildenafil 50</a> <a href="https://metforminsale.com/">metformin 850 mg</a> <a href="https://viagrasr.com/">sildenafil fast delivery</a> <a href="https://upsildenafil.com/">otc viagra canada</a>
I'm gone to tell my little brother, that he should also visit this blog
on regular basis to obtain updated from hottest information.
I'm gone to tell my little brother, that he should
also visit this blog on regular basis to obtain updated from hottest
information.
<a href="http://levothyroxinesynthroid.com/">synthroid mexico pharmacy</a> <a href="http://buyazithromycinzithromax.com/">azithromycin 250 mg coupon</a> <a href="http://wellbutrinabupropion.com/">bupropion cheap</a> <a href="http://bactrimotc.com/">bactrim generic cost</a> <a href="http://arimidexanastrozole.com/">arimidex depression</a>
<a href="http://azithromycinzithromax.com/">azithromycin cream over the counter</a>
If you would like to take much from this piece of writing then you have to apply these strategies to your won webpage.
<a href="https://finasteridefinpecia.com/">generic propecia online</a> <a href="https://milpharmacy.com/">promo code for canadian pharmacy meds</a> <a href="https://upsildenafil.com/">female viagra online canada</a> <a href="https://tetracyclineonline.com/">tetracycline 500 mg tablet</a>
<a href=http://rai-santehniki.ru/>Сантехнические работы</a>
<a href=https://all-my-services.com/novokuznetsk/remont-i-obsluzhivanie-tekhniki/kompyuternaya-tekhnika/remont-kompyuterov-v-gorode/>Ремонт компьютеров в Новокузнецке</a>
<a href=https://all-my-services.com/ufa/remont-i-obsluzhivanie-tekhniki/kompyuternaya-tekhnika/kompyuternaya-pomosh/>Компьютерная помощь</a>
<a href=https://all-my-services.com/sochi/remont-i-obsluzhivanie-tekhniki/kompyuternaya-tekhnika/kompyuternyy-master/>Компьютерный мастер в Сочи</a>
<a href=https://rai-santehniki.ru/uslugi-elektrika-moskva-cena/>Услуги электрика МСК</a>
<a href="http://viagra10x.com/">viagra by phone</a> <a href="http://bactrimotc.com/">bactrim 800 160 mg tablet</a> <a href="http://wellbutrinbupropionpill.com/">bupropion tablet price in india</a> <a href="http://cymbaltadulox.com/">cymbalta price canada 60mg</a> <a href="http://levitravardena.com/">levitra medicine</a> <a href="http://clomidoral.com/">clomid tablets online</a> <a href="http://avanapill.com/">dapoxetine 60 mg price</a> <a href="http://buyazithromycinzithromax.com/">order zithromax over the counter</a>
levitra vs viagra <a href="http://llviabest.com/#">viagra ireland 2011</a> viagra with dapoxetine overnight http://llviabest.com/ - where to find viagra in winnipeg ’
<a href="https://avanapill.com/">dapoxetine 90mg</a>
You're so cool! I don't think I've truly read through anything like this before.
So good to discover another person with a few original thoughts on this subject.
Really.. thanks for starting this up. This website is something that is needed on the internet,
someone with a little originality!
You're so cool! I don't think I've truly read through anything like
this before. So good to discover another person with a few original
thoughts on this subject. Really.. thanks for starting this up.
This website is something that is needed
on the internet, someone with a little originality!
<a href="https://phenerganpromethazine.com/">order phenergan</a>
<a href="https://lyricamedication.com/">price for lyrica 75 mg</a> <a href="https://quetiapineseroquel.com/">seroquel cream</a> <a href="https://wherecialis.com/">non prescription cialis</a> <a href="https://citamoxifen.com/">cheap tamoxifen</a> <a href="https://finasteridepropecia.com/">buy brand propecia online</a> <a href="https://zoviraxaciclovir.com/">acyclovir uk</a> <a href="https://doxycyclinerem.com/">buying doxycycline uk</a> <a href="https://propeciaafinasteride.com/">pharmacy propecia</a> <a href="https://bactrimotc.com/">buy bactrim without prescription</a> <a href="https://viagrasr.com/">viagra soft canada</a>
<a href="http://viagramn.com/">generic viagra 30</a>
<a href="http://avodartpill.com/">buy generic avodart online no rx</a>
<a href="http://citamoxifen.com/">nolvadex india</a> <a href="http://tetracyclineonline.com/">tetracycline price south africa</a> <a href="http://tretinoinretinacream.com/">retin a daily</a> <a href="http://trazodonesari.com/">desyrel 50 mg for sleep</a> <a href="http://tetracyclinepill.com/">generic sumycin</a> <a href="http://bactrimotc.com/">where can i buy bactrim online</a> <a href="http://levothyroxinesynthroid.com/">synthroid 50 mg cost</a> <a href="http://viagrasildenafilotc.com/">buy viagra online mexico</a> <a href="http://genuinesildenafil.com/">buy viagra online price</a> <a href="http://forcepharmacy.com/">my canadian pharmacy rx</a>
<a href="https://cialistore.com/">buy cialis online canadian pharmacy</a> <a href="https://wherecialis.com/">cialis tablets</a> <a href="https://metformindrug.com/">metformin generic price</a> <a href="https://zyloprimallopurinol.com/">rx allopurinol</a> <a href="https://tadalafilxl.com/">cheap cialis in australia</a> <a href="https://forcepharmacy.com/">top 10 online pharmacy in india</a> <a href="https://azithromycinzithromax.com/">generic azithromycin online</a> <a href="https://trazodonesari.com/">trazodone 159</a> <a href="https://amoxicillintrimox.com/">augmentin pill</a> <a href="https://levitravardena.com/">buy levitra safely online</a>
cialis supr active <a href="http://mycialedst.com/#">arghentina cialis</a> generic cialis 20 mg x 30 http://mycialedst.com/ - cialis for low price ’
<a href="https://oipharmacy.com/">canadian pharmacy 1 internet online drugstore</a>
<a href="https://opcialis.com/">tadalafil purchase online</a> <a href="https://fildenasildenafil.com/">viagra how to</a> <a href="https://cialisdrug.com/">cialis tablet price</a> <a href="https://levitravardena.com/">buy levitra uk</a> <a href="https://hicialis.com/">cheapest cialis online india</a>
купит лицензионные игры +на xbox+ https://plati.market/itm/red-dead-redemption-2-xbox-ar-key-podarok/2983253
<a href=https://plati.market/itm/fifa-20-uk-xbox-one-kljuch-cifr-kod--podarok/2961184> FIFA 20 XBOX ONE Ключ / Цифр код + подарок </a>
<a href=https://plati.market/itm/grand-theft-auto-v-gta-5-xbox-one-cifrovoj-kljuch/3008735> ? Grand Theft Auto V / GTA 5 XBOX ONE Цифровой Ключ ??</a>
<a href=https://plati.market/itm/3009258>Watch Dogs 2 - Xbox Live Key - +подарок </a>
<a href=https://plati.market/itm/3051395>Resident Evil 3 Key </a>
<a href=https://plati.market/itm/3037131>BATTLEFIELD V? Key XBOX ONE+подарок</a>
<a href=https://plati.market/itm/metro-last-light-redux-xbox-one-present/2915157>METRO: LAST LIGHT REDUX XBOX ONE+подарок</a>
<a href=https://plati.market/itm/2961721>The Crew 2 ?? XBOX/PC+present </a>
<a href=https://plati.market/itm/2970072>Diablo III: Eternal Collection Xbox One</a>
<a href=https://plati.market/itm/3008085>FAR CRY </a>
<a href=https://plati.market/itm/3048986>Cities: Skylines - Xbox One Edition </a>
<a href=https://plati.market/itm/assassin-s-creed-odisseja-br-xbox-kljuch-podarok/2966161> Red dead Online XBOX Key+подарок </a>
<a href=https://plati.market/itm/3045341>Thief XBOX ONE Цифровой ключ</a>
<a href=https://plati.market/itm/2976540>The Sims 4 XBOX One Digital Key</a>
<a href=https://plati.market/itm/3036392>Call of Duty Black Ops Cold War-аккаунт Xbox=400р</a>
<a href="http://prednisoneprednisolone.com/">prednisone without prescription</a> <a href="http://clomidclomifene.com/">clomid pharmacy online</a>
Приветствую всех!
Нашел интересную инфу на этом сайте: http://okaybro.ru :
http://okaybro.ru/3156-lea-seydu-v-another-magazine.html
Роскошный дом в заброшенном амбаре http://okaybro.ru/5941-roskoshnyy-dom-v-zabroshennom-ambare.html
Охота на северное сияние в поселке Териберка <a href=http://okaybro.ru/8198-ohota-na-severnoe-siyanie-v-poselke-teriberka.html> Охота на северное сияние в поселке Териберка </a>
<a href="https://amoxicillintrimox.com/">augmentin 500mg 125mg</a> <a href="https://citamoxifen.com/">nolvadex for sale cheap</a> <a href="https://metforminsale.com/">glucophage buy uk</a>