fbpx
วิกิพีเดีย

รายชื่อส่วนหัวของเอชทีทีพี

ส่วนหัวของเอชทีทีพี เป็นส่วนประกอบหลักของการร้องขอบนเอชทีทีพี และเป็นส่วนที่สำคัญสำหรับการตอบรับเอชทีทีพีด้วย ส่วนหัวเหล่านี้เป็นการกำหนดลักษณะเฉพาะต่าง ๆ ของข้อมูลที่ร้องขอ หรือข้อมูลที่ถูกจัดสรรให้ ส่วนหัวของเอชทีทีพีแยกออกจากส่วนของเนื้อหาด้วยบรรทัดว่างหนึ่งบรรทัด ข้อมูลส่วนหัวอาจเป็นสายอักขระที่แทบจะไม่มีกฎเกณฑ์ แต่ก็มีส่วนหัวบางตัวที่เป็นที่ยอมรับและเข้าใจโดยทั่วไป

การร้องขอ

ส่วนหัว คำอธิบาย ตัวอย่าง
Accept ประเภทของเนื้อหาที่ยอมรับ Accept: text/plain
Accept-Charset รหัสอักขระที่ยอมรับ Accept-Charset: iso-8859-5
Accept-Encoding การเข้ารหัสข้อมูลที่ยอมรับ Accept-Encoding: compress, gzip
Accept-Language ภาษาที่ยอมรับในการตอบรับ Accept-Language: da
Accept-Ranges อนุญาตให้เครื่องแม่ข่ายแสดงการยอมรับการร้องขอของทรัพยากรเป็นช่วง Accept-Ranges: bytes
Authorization รหัสรับรองการยืนยันตนของผู้ใช้ Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Cache-Control ใช้เพื่อกำหนดคำสั่งชี้แนะว่าจะต้องทำตามกลไกการเก็บแคชทั้งหมดโดยตลอดทั้งการร้องขอและการตอบรับ Cache-Control: no-cache
Connection ประเภทของการเชื่อมต่อที่ตัวแทนผู้ใช้ต้องการ Connection: close
Cookie เอชทีทีพีคุกกี้ที่ถูกส่งมาก่อนหน้านี้จากเครื่องแม่ข่ายด้วยส่วนหัว Set-Cookie Cookie: $Version=1; UserId=JohnDoe
Content-Length ความยาวของข้อมูลเนื้อหา วัดเป็นไบต์ที่มีขนาดแปดบิต Content-Length: 348
Content-Type ชนิดไมม์ของเนื้อหาที่ร้องขอ (ใช้กับ POST และ PUT) Content-Type: application/x-www-form-urlencoded
Date วันที่และเวลาที่ข้อความนั้นถูกส่งไป Date: Tue, 15 Nov 1994 08:12:31 GMT
Expect แสดงพฤติกรรมที่ต้องการจากเครื่องแม่ข่ายบางชนิด Expect: 100-continue
From ที่อยู่อีเมลของผู้ใช้ที่ทำการร้องขอ From: user@email.com
Host ชื่อโดเมนของเครื่องแม่ข่าย เป็นส่วนหัวที่จำเป็นต้องมีตั้งแต่ HTTP/1.1 Host: en.wikipedia.org
If-Match จะกระทำการนี้ถ้าทรัพยากรของเครื่องลูกข่ายตรงกับเครื่องแม่ข่าย โดยหลักแล้วใช้สำหรับคำสั่งอย่างเช่น PUT เพื่ออัปเดตทรัพยากรเท่านั้น หากทรัพยากรนั้นไม่มีการเปลี่ยนแปลงเลยหลังจากผู้ใช้คนนั้นได้อัปเดตล่าสุด If-Match: "737060cd8c284d8af7ad3082f209582d"
If-Modified-Since อนุญาตให้เครื่องแม่ข่ายตอบรับว่า 304 Not Modified ถ้าทรัพยากรไม่มีการเปลี่ยนแปลงตั้งแต่เวลาที่ระบุ If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
If-None-Match อนุญาตให้เครื่องแม่ข่ายตอบรับว่า 304 Not Modified ถ้าทรัพยากรไม่มีการเปลี่ยนแปลง If-None-Match: "737060cd8c284d8af7ad3082f209582d"
If-Range ถ้าทรัพยากรไม่มีการเปลี่ยนแปลง ให้ส่งข้อมูลบางส่วนที่ขาดหายไปเข้ามา ถ้าไม่เช่นนั้นแล้ว ก็ให้ส่งข้อมูลใหม่ทั้งหมดมาให้ If-Range: "737060cd8c284d8af7ad3082f209582d"
If-Unmodified-Since กำหนดให้ส่งการตอบรับก็ต่อเมื่อทรัพยากรนั้นไม่มีการเปลี่ยนแปลงตั้งแต่เวลาที่ระบุ If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
Max-Forwards จำกัดจำนวนครั้งที่ข้อความจะสามารถส่งต่อผ่านพร็อกซีหรือเกตเวย์ Max-Forwards: 10
Pragma ส่วนหัวที่มีการนำไปใช้เฉพาะทาง ซึ่งทำให้เกิดผลกระทบบางแห่งโดยตลอดทั้งการร้องขอและการตอบรับ Pragma: no-cache
Proxy-Authorization รหัสรับรองการยืนยันตนสำหรับการเชื่อมต่อผ่านพร็อกซี Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Range ร้องขอข้อมูลทรัพยากรบางส่วน Range: bytes=500-999
Referer ที่อยู่เว็บของเว็บเพจก่อนหน้า ซึ่งมีการเชื่อมโยงโดยตรงมายังหน้าที่ร้องขอ Referer: http://en.wikipedia.org/wiki/Main_Page
TE การเข้ารหัสข้อมูลที่ผู้ใช้คาดหวังว่าจะได้รับ TE: trailers, deflate;q=0.5
Upgrade สอบถามเครื่องแม่ข่ายให้อัปเดตโพรโทคอลอื่น ๆ Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
User-Agent สายอักขระแสดงชื่อของโปรแกรมตัวแทนผู้ใช้ User-Agent: Mozilla/5.0 (Linux; X11)
Via แจ้งให้เครื่องแม่ข่ายทราบว่าการร้องขอส่งผ่านมาจากพร็อกซีใด Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warn คำเตือนทั่วไปเกี่ยวกับปัญหาที่อาจเกิดขึ้นในเนื้อหาทรัพยากร Warn: 199 Miscellaneous warning

การตอบรับ

ส่วนหัว คำอธิบาย ตัวอย่าง
Accept-Ranges เครื่องแม่ข่ายแจ้งว่ายอมรับช่วงของเนื้อหาแบบใด Accept-Ranges: bytes
Age อายุขัยของวัตถุที่จะอยู่ในพร็อกซีเป็นวินาที Age: 12
Allow การกระทำที่สามารถใช้ได้ทรัพยากรที่ระบุ ใช้กับรหัสสถานภาพ 405 Method Not Allowed Allow: GET, HEAD
Cache-Control แจ้งไปยังกลไกการเก็บแคชไปยังเครื่องลูกข่าย ไม่ว่าวัตถุนี้จะเก็บลงแคชหรือไม่ Cache-Control: no-cache
Content-Encoding ประเภทของการเข้ารหัสที่ใช้กับข้อมูลนี้ Content-Encoding: gzip
Content-Language ภาษาของเนื้อหา Content-Language: da
Content-Length ความยาวของข้อมูลเนื้อหา วัดเป็นไบต์ที่มีขนาดแปดบิต Content-Length: 348
Content-Location ตำแหน่งทางเลือกสำหรับข้อมูลที่คืนกลับไป Content-Location: /index.htm
Content-Disposition เปิดโอกาสให้ขึ้นกล่องโต้ตอบ "ดาวน์โหลดไฟล์" สำหรับชนิดไมม์ที่รู้จัก Content-Disposition: attachment; filename=fname.ext
Content-MD5 ผลรวม MD5 ของเนื้อหาในการตอบรับ แปลงเป็นรูปแบบ Base64 Content-MD5: 3167b9c13ad2b6d36946493fc47976c8
Content-Range ใช้บอกว่าเนื้อหาที่ตอบรับเป็นส่วนหนึ่งของเนื้อหาเต็มในช่วงที่กำหนด Content-Range: bytes 21010-47021/47022
Content-Type ชนิดไมม์ของเนื้อหานี้ Content-Type: text/html; charset=utf-8
Date วันที่และเวลาที่ข้อความนั้นถูกส่งมาจากเครื่องแม่ข่าย Date: Tue, 15 Nov 1994 08:12:31 GMT
ETag ตัวระบุสำหรับรุ่นเฉพาะของทรัพยากร มักจะเป็นฟังก์ชันแฮช ETag: 737060cd8c284d8af7ad3082f209582d
Expires วันและเวลาที่กำหนดว่าการตอบรับจะกลายเป็นข้อมูลล้าสมัย Expires: Thu, 01 Dec 1994 16:00:00 GMT
Last-Modified วันและเวลาเปลี่ยนแปลงล่าสุดของวัตถุที่ร้องขอ ในรูปแบบ RFC 2822 Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
Location ใช้สำหรับการเปลี่ยนตำแหน่ง หรือใช้เมื่อทรัพยากรใหม่ถูกสร้างขึ้น Location: http://www.w3.org/pub/WWW/People.html
Pragma ส่วนหัวที่มีการนำไปใช้เฉพาะทาง ซึ่งทำให้เกิดผลกระทบบางแห่งโดยตลอดทั้งการร้องขอและการตอบรับ Pragma: no-cache
Proxy-Authenticate แจ้งไปยังผู้ใช้ให้มีการยืนยันตนสำหรับการเชื่อมต่อผ่านพร็อกซี Proxy-Authenticate: Basic
Refresh ใช้สำหรับการเปลี่ยนทาง หรือใช้เมื่อทรัพยากรใหม่ถูกสร้างขึ้น ตัวอย่างนี้เป็นการเปลี่ยนทางหลังจาก 5 วินาที (ส่วนหัวนี้เป็นส่วนขยายที่เป็นเอกสิทธิ์ของเนตสเคปซึ่งไม่เป็นมาตรฐาน แต่ก็รองรับโดยเว็บเบราว์เซอร์ส่วนใหญ่) Refresh: 5; url=http://www.w3.org/pub/WWW/People.html
Retry-After ถ้าหากทรัพยากรไม่สามารถใช้งานได้ในช่วงระยะเวลาหนึ่ง ส่วนหัวนี้จะบอกให้เครื่องลูกข่ายส่งการร้องขอมาอีกครั้งหลังจากช่วงเวลาหลังจากนี้เป็นวินาที Retry-After: 120
Server ชื่อของเครื่องแม่ข่าย Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)
Set-Cookie เอชทีทีพีคุกกี้ Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1
Trailer The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer-coding. Trailer: Max-Forwards
Transfer-Encoding รูปแบบของการเข้ารหัสซึ่งใช้สำหรับการส่งทรัพยากรอย่างปลอดภัยไปยังผู้ใช้ Transfer-Encoding: chunked
Vary แจ้งไปยังพร็อกซีขาลงว่าจะให้จับคู่การร้องขอในครั้งหน้าอย่างไร เพื่อที่จะตัดสินว่าควรใช้การตอบรับที่อยู่ในแคช แทนที่จะร้องขอทรัพยากรมาใหม่อีกครั้ง Vary: *
Via แจ้งให้เครื่องลูกข่ายทราบว่าการตอบรับส่งผ่านมาจากพร็อกซีใด Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warn คำเตือนทั่วไปเกี่ยวกับปัญหาที่อาจเกิดขึ้นในเนื้อหาทรัพยากร Warn: 199 Miscellaneous warning
WWW-Authenticate แสดงรูปแบบของการยืนยันตนที่ใช้สำหรับการเข้าถึงทรัพยากรที่ร้องขอ WWW-Authenticate: Basic

แหล่งข้อมูลอื่น

  • IETF HTTP/1.1 RFC
  • IETF HTTP State Management Mechanism RFC
  • HTTP/1.1: Header Field Definitions
  • HTTP/1.1 headers from a web server point of view
  • HTTP Header Viewer with Google App Engine

รายช, อส, วนห, วของเอชท, วนห, วของเอชท, เป, นส, วนประกอบหล, กของการร, องขอบนเอชท, และเป, นส, วนท, สำค, ญสำหร, บการตอบร, บเอชท, วย, วนห, วเหล, าน, เป, นการกำหนดล, กษณะเฉพาะต, าง, ของข, อม, ลท, องขอ, หร, อข, อม, ลท, กจ, ดสรรให, วนห, วของเอชท, แยกออกจากส, วนของเน. swnhwkhxngexchthithiphi epnswnprakxbhlkkhxngkarrxngkhxbnexchthithiphi aelaepnswnthisakhysahrbkartxbrbexchthithiphidwy swnhwehlaniepnkarkahndlksnaechphaatang khxngkhxmulthirxngkhx hruxkhxmulthithukcdsrrih swnhwkhxngexchthithiphiaeykxxkcakswnkhxngenuxhadwybrrthdwanghnungbrrthd khxmulswnhwxacepnsayxkkhrathiaethbcaimmikdeknth aetkmiswnhwbangtwthiepnthiyxmrbaelaekhaicodythwipkarrxngkhx aekikhswnhw khaxthibay twxyangAccept praephthkhxngenuxhathiyxmrb Accept text plainAccept Charset rhsxkkhrathiyxmrb Accept Charset iso 8859 5Accept Encoding karekharhskhxmulthiyxmrb Accept Encoding compress gzipAccept Language phasathiyxmrbinkartxbrb Accept Language daAccept Ranges xnuyatihekhruxngaemkhayaesdngkaryxmrbkarrxngkhxkhxngthrphyakrepnchwng Accept Ranges bytesAuthorization rhsrbrxngkaryunyntnkhxngphuich Authorization Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ Cache Control ichephuxkahndkhasngchiaenawacatxngthatamklikkarekbaekhchthnghmdodytlxdthngkarrxngkhxaelakartxbrb Cache Control no cacheConnection praephthkhxngkarechuxmtxthitwaethnphuichtxngkar Connection closeCookie exchthithiphikhukkithithuksngmakxnhnanicakekhruxngaemkhaydwyswnhw Set Cookie Cookie Version 1 UserId JohnDoeContent Length khwamyawkhxngkhxmulenuxha wdepnibtthimikhnadaepdbit Content Length 348Content Type chnidimmkhxngenuxhathirxngkhx ichkb POST aela PUT Content Type application x www form urlencodedDate wnthiaelaewlathikhxkhwamnnthuksngip Date Tue 15 Nov 1994 08 12 31 GMTExpect aesdngphvtikrrmthitxngkarcakekhruxngaemkhaybangchnid Expect 100 continueFrom thixyuxiemlkhxngphuichthithakarrxngkhx From user email comHost chuxodemnkhxngekhruxngaemkhay epnswnhwthicaepntxngmitngaet HTTP 1 1 Host en wikipedia orgIf Match cakrathakarnithathrphyakrkhxngekhruxnglukkhaytrngkbekhruxngaemkhay odyhlkaelwichsahrbkhasngxyangechn PUT ephuxxpedtthrphyakrethann hakthrphyakrnnimmikarepliynaeplngelyhlngcakphuichkhnnnidxpedtlasud If Match 737060cd8c284d8af7ad3082f209582d If Modified Since xnuyatihekhruxngaemkhaytxbrbwa 304 Not Modified thathrphyakrimmikarepliynaeplngtngaetewlathirabu If Modified Since Sat 29 Oct 1994 19 43 31 GMTIf None Match xnuyatihekhruxngaemkhaytxbrbwa 304 Not Modified thathrphyakrimmikarepliynaeplng If None Match 737060cd8c284d8af7ad3082f209582d If Range thathrphyakrimmikarepliynaeplng ihsngkhxmulbangswnthikhadhayipekhama thaimechnnnaelw kihsngkhxmulihmthnghmdmaih If Range 737060cd8c284d8af7ad3082f209582d If Unmodified Since kahndihsngkartxbrbktxemuxthrphyakrnnimmikarepliynaeplngtngaetewlathirabu If Unmodified Since Sat 29 Oct 1994 19 43 31 GMTMax Forwards cakdcanwnkhrngthikhxkhwamcasamarthsngtxphanphrxksihruxektewy Max Forwards 10Pragma swnhwthimikarnaipichechphaathang sungthaihekidphlkrathbbangaehngodytlxdthngkarrxngkhxaelakartxbrb Pragma no cacheProxy Authorization rhsrbrxngkaryunyntnsahrbkarechuxmtxphanphrxksi Proxy Authorization Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ Range rxngkhxkhxmulthrphyakrbangswn Range bytes 500 999Referer thixyuewbkhxngewbephckxnhna sungmikarechuxmoyngodytrngmaynghnathirxngkhx Referer http en wikipedia org wiki Main PageTE karekharhskhxmulthiphuichkhadhwngwacaidrb TE trailers deflate q 0 5Upgrade sxbthamekhruxngaemkhayihxpedtophrothkhxlxun Upgrade HTTP 2 0 SHTTP 1 3 IRC 6 9 RTA x11User Agent sayxkkhraaesdngchuxkhxngopraekrmtwaethnphuich User Agent Mozilla 5 0 Linux X11 Via aecngihekhruxngaemkhaythrabwakarrxngkhxsngphanmacakphrxksiid Via 1 0 fred 1 1 nowhere com Apache 1 1 Warn khaetuxnthwipekiywkbpyhathixacekidkhuninenuxhathrphyakr Warn 199 Miscellaneous warningkartxbrb aekikhswnhw khaxthibay twxyangAccept Ranges ekhruxngaemkhayaecngwayxmrbchwngkhxngenuxhaaebbid Accept Ranges bytesAge xayukhykhxngwtthuthicaxyuinphrxksiepnwinathi Age 12Allow karkrathathisamarthichidthrphyakrthirabu ichkbrhssthanphaph 405 Method Not Allowed Allow GET HEADCache Control aecngipyngklikkarekbaekhchipyngekhruxnglukkhay imwawtthunicaekblngaekhchhruxim Cache Control no cacheContent Encoding praephthkhxngkarekharhsthiichkbkhxmulni Content Encoding gzipContent Language phasakhxngenuxha Content Language daContent Length khwamyawkhxngkhxmulenuxha wdepnibtthimikhnadaepdbit Content Length 348Content Location taaehnngthangeluxksahrbkhxmulthikhunklbip Content Location index htmContent Disposition epidoxkasihkhunklxngottxb dawnohldifl sahrbchnidimmthiruck Content Disposition attachment filename fname extContent MD5 phlrwm MD5 khxngenuxhainkartxbrb aeplngepnrupaebb Base64 Content MD5 3167b9c13ad2b6d36946493fc47976c8Content Range ichbxkwaenuxhathitxbrbepnswnhnungkhxngenuxhaetminchwngthikahnd Content Range bytes 21010 47021 47022Content Type chnidimmkhxngenuxhani Content Type text html charset utf 8Date wnthiaelaewlathikhxkhwamnnthuksngmacakekhruxngaemkhay Date Tue 15 Nov 1994 08 12 31 GMTETag twrabusahrbrunechphaakhxngthrphyakr mkcaepnfngkchnaehch ETag 737060cd8c284d8af7ad3082f209582dExpires wnaelaewlathikahndwakartxbrbcaklayepnkhxmullasmy Expires Thu 01 Dec 1994 16 00 00 GMTLast Modified wnaelaewlaepliynaeplnglasudkhxngwtthuthirxngkhx inrupaebb RFC 2822 Last Modified Tue 15 Nov 1994 12 45 26 GMTLocation ichsahrbkarepliyntaaehnng hruxichemuxthrphyakrihmthuksrangkhun Location http www w3 org pub WWW People htmlPragma swnhwthimikarnaipichechphaathang sungthaihekidphlkrathbbangaehngodytlxdthngkarrxngkhxaelakartxbrb Pragma no cacheProxy Authenticate aecngipyngphuichihmikaryunyntnsahrbkarechuxmtxphanphrxksi Proxy Authenticate BasicRefresh ichsahrbkarepliynthang hruxichemuxthrphyakrihmthuksrangkhun twxyangniepnkarepliynthanghlngcak 5 winathi swnhwniepnswnkhyaythiepnexksiththikhxngentsekhpsungimepnmatrthan aetkrxngrbodyewbebrawesxrswnihy Refresh 5 url http www w3 org pub WWW People htmlRetry After thahakthrphyakrimsamarthichnganidinchwngrayaewlahnung swnhwnicabxkihekhruxnglukkhaysngkarrxngkhxmaxikkhrnghlngcakchwngewlahlngcakniepnwinathi Retry After 120Server chuxkhxngekhruxngaemkhay Server Apache 1 3 27 Unix Red Hat Linux Set Cookie exchthithiphikhukki Set Cookie UserID JohnDoe Max Age 3600 Version 1Trailer The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding Trailer Max ForwardsTransfer Encoding rupaebbkhxngkarekharhssungichsahrbkarsngthrphyakrxyangplxdphyipyngphuich Transfer Encoding chunkedVary aecngipyngphrxksikhalngwacaihcbkhukarrxngkhxinkhrnghnaxyangir ephuxthicatdsinwakhwrichkartxbrbthixyuinaekhch aethnthicarxngkhxthrphyakrmaihmxikkhrng Vary Via aecngihekhruxnglukkhaythrabwakartxbrbsngphanmacakphrxksiid Via 1 0 fred 1 1 nowhere com Apache 1 1 Warn khaetuxnthwipekiywkbpyhathixacekidkhuninenuxhathrphyakr Warn 199 Miscellaneous warningWWW Authenticate aesdngrupaebbkhxngkaryunyntnthiichsahrbkarekhathungthrphyakrthirxngkhx WWW Authenticate Basicaehlngkhxmulxun aekikhIETF HTTP 1 1 RFC IETF HTTP State Management Mechanism RFC HTTP 1 1 Header Field Definitions HTTP 1 1 headers from a web server point of view HTTP Header Viewer with Google App Engineekhathungcak https th wikipedia org w index php title raychuxswnhwkhxngexchthithiphi amp oldid 8968678, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

, อ่าน, ดาวน์โหลด, ฟรี, ดาวน์โหลดฟรี, mp3, วิดีโอ, mp4, 3gp, jpg, jpeg, gif, png, รูปภาพ, เพลง, เพลง, หนัง, หนังสือ, เกม, เกม