Daim Ntawv Teev Npe Ua tiav ntawm HTTP Cov Kab Mob

Cov txheej txheem:

Daim Ntawv Teev Npe Ua tiav ntawm HTTP Cov Kab Mob
Daim Ntawv Teev Npe Ua tiav ntawm HTTP Cov Kab Mob
Anonim

Cov kab xwm txheej HTTP yog lo lus muab rau HTTP txheej xwm code (tus lej lej tiag) thaum nrog HTTP vim li cas kab lus 1 (cov lus piav qhia luv luv).

Peb tseem khaws cov npe HTTP xwm txheej yuam kev (4xx thiab 5xx) nrog rau qee cov lus qhia txog yuav kho lawv li cas.

Txawm hais tias cov txheej txheem tsis raug, cov kab xwm txheej HTTP feem ntau raug xa mus rau qhov yooj yim HTTP txheej xwm lis dej num.

Image
Image

HTTP xwm txheej Code pawg

Raws li koj tuaj yeem pom hauv qab no, HTTP txheej xwm cov lej yog tus lej peb tus lej. Thawj tus lej yog siv los txheeb xyuas cov lej hauv ib pawg tshwj xeeb-ib ntawm tsib:

  • 1XX: Cov ntaub ntawv-kev thov raug lees txais lossis cov txheej txheem txuas ntxiv mus.
  • 2XX: Paub meej tias qhov kev txiav txim tiav tiav lossis tau nkag siab.
  • 3XX: Redirection-qee yam lwm yam yuav tsum muaj nyob rau hauv thiaj li yuav ua kom tiav qhov kev thov.
  • 4XX: Cov neeg siv khoom yuam kev uas qhia tias qhov kev thov ua tsis tiav lossis muaj cov syntax tsis raug.
  • 5XX: Server yuam kev uas qhia tias tus neeg rau zaub mov ua tsis tiav qhov kev thov uas tau xav tias siv tau.

Daim ntawv thov nkag siab HTTP cov cai tsis tas yuav tsum paub tag nrho cov lej no, uas txhais tau hais tias tus lej tsis paub kuj muaj cov lus tsis paub HTTP vim li cas, uas yuav tsis muab cov ntaub ntawv ntau rau cov neeg siv. Txawm li cas los xij, cov ntawv thov HTTP no yuav tsum nkag siab cov pawg lossis cov chav kawm raws li peb tau piav qhia saum toj no.

Yog tias lub software tsis paub tias cov cai tshwj xeeb txhais li cas, nws tuaj yeem txheeb xyuas cov chav kawm tsawg kawg nkaus. Piv txwv li, yog tias tus lej 490 tsis paub txog daim ntawv thov, nws tuaj yeem kho nws li 400 vim tias nws nyob hauv tib pawg, thiab tom qab ntawd tuaj yeem xav tias muaj qee yam tsis raug rau tus neeg thov.

HTTP Status Kab (HTTP Txoj Cai Codes + HTTP Vim Li Cas Kab Lus)

Txoj cai HTTP kab xwm txheej
Status Code Vim nqe lus
100 Txuas ntxiv
101 Kev hloov raws cai
102 Kev ua haujlwm
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Ib Nrab Cov Ntsiab Lus
207 Multi-Status
208 Tshuaj Tshaj Tawm
300 Ntau txoj kev xaiv
301 Moved Permanently
302 Ntawm
303 See Other
304 Tsis hloov kho
305 Siv Proxy
307 Kev hloov pauv ib ntus
308 Permanent Redirect
400 Kev thov tsis zoo
401 Unauthorized
402 Yuav tsum tau them nyiaj
403 Forbidden
404 Tsis pom
405 Txoj Kev Tsis Tso Cai
406 Tsis Tau
407 Proxy Authentication Required
408 Thov sij hawm tawm
409 Kev tsis sib haum xeeb
410 Nyob
411 Ntev Yuav Tsum Tau
412 Precondition failed
413 Nyob qhov twg loj heev
414 Request-URI Too Large
415 Unsupported Media Type
416 Txoj Kev Sib Tw Tsis Txaus Siab
417 Kev cia siab tsis ua tiav
421 Kev thov yuam kev
422 Unprocessable Entity
423 Luag
424 Kev vam meej
425 Unordered Collection
426 Yuav tsum tau hloov kho
428 Yuav tsum tau ua ntej
429 Too Ntau Thov
431 Thov Header Fields Loj heev
451 Unavailable For legal Reasons
500 Internal Server yuam kev
501 tsis ua tiav
502 Bad Gateway
503 Kev Pab Tsis Muaj
504 Lub Sijhawm Tawm Tawm
505 HTTP Version Tsis Txaus Siab
506 Variant Kuj Negotiates
507 Cia tsis txaus
508 Loop Detected
510 tsis txuas ntxiv
511 Network Authentication Yuav tsum tau

[1] HTTP vim li cas kab lus uas nrog HTTP txheej xwm cov lej tsuas yog pom zoo. Ib kab lus sib txawv tau tso cai rau RFC 2616 6.1.1. Tej zaum koj yuav pom HTTP vim li cas cov nqe lus hloov nrog ntau "tus phooj ywg" piav qhia lossis ua lus hauv zos.

Tsis raug cai HTTP kab xwm txheej

Cov kab xwm txheej HTTP hauv qab no yuav raug siv los ntawm qee qhov kev pabcuam thib peb raws li cov lus teb yuam kev, tab sis lawv tsis tau teev tseg los ntawm ib qho RFC.

Lwm Yam Ua Tau HTTP Kab Kab
Status Code Vim nqe lus
103 Checkpoint
420 Txoj Kev Tsis Ua Haujlwm
420
440 Nyob rau hauv Timeout
449 Retry With
450 Blocked los ntawm Windows Parental Controls
451 Redirect
498 Tsis siv tau Token
499 Token Yuav tsum tau
499 Thov tau txwv tsis pub los ntawm antivirus
509 Bandwidth txwv tshaj
530 Site is khov

Nws yog ib qho tseem ceeb uas yuav tsum nco ntsoov tias thaum HTTP txheej xwm txheej xwm yuav qhia tib cov lej nrog cov lus yuam kev pom nyob rau hauv lwm cov ntsiab lus, xws li nrog Tus Thawj Tswj Ntaus Ntawv yuam kev, nws tsis txhais hais tias lawv muaj feem cuam tshuam nrog txhua txoj hauv kev.

Pom zoo: