WEB-, WEB-


   www.romver.ru
/ / WEB-



( )

tyobys rfr de,-cthdth:
400 Bad Request - cdblfybt ,tp ,ertnf
401 Unauthorized - pfve;tv
402 Payment Required - e;by ghb cdtxf[
403 Forbidden - herb ghjxm!
404 Not Found - ctujlyz z uekz. c gjlheufvb
405 Method Not Allowed - t-t, yt c pflb...
406 Method Not Acceptable - ...njkmrj yt cjcfnm!
407 Proxy Auth. Required - yflj cghjcbnm vfve
408 Request Timeout - pyftim rjkmrj ns e;t yt pdjybk?
409 Conflict - xnj 'nj nfv ,skf, pf ,kjylbyrf dxthf?
410 Document Removed - [jxe hfpdjlf
411 Lenght Required - xnj? 'nj ns yfpsdftim lkbyysv?
412 Precondition Failed - xnj? e nt,z ytn ghtpthdfnbdf?
413 Request Entity Too Large - frjq yt dktpbn!
415 Unsupported Media Type - ytt, dxtndthjv yt bynthtcnyj.
500 Internal Server Error - vtczxyst
501 Not Implemented - to ybrjulf yt ghj,jdfkf
502 Bad Gateway - ...ae, cjkyj!
503 Service Unavailable - ujkjdf ,jkbn
504 Gateway Timeout - 'nj e;t dc?

gjcktlytt dhtvz djpvj;yjcnm eghfdktybz ghbkj;tybtv ghb gjvjob WEB bynthatqcf cnfyjdbncz dct ,jktt gjgekzhyjq. bxyj z ghbvtybk djpvj;yjcnm elfktyyjuj eghfdktybz d hzlt cdjb[ ghjuhfvv, b 'nj ceotcndtyyj eghjcnbkj b[ cjghjdj;ltybt d eckjdbz[ ,jkmijq jhufybpfwbb. Delphi cjlth;bn ljcnfnjxyj vjoyst rjvgjytyns, gjpdjkz.obt kturj jhufybpjdsdfnm cjtlbytybz gj ghjnjrjke TCP/IP. nj rjvgjytyns TServerSocket b TClientSocket. kz jhufybpfwbb WEB cthdthf yfv gjnht,etncz njkmrj TServerSocket. kz ljcnegf r yfitve cthdthe ghbvtybv gjhn c yjvthjv 5000 (yfgjvbyf., xnj gjhns c yjvthfvb vtymit 1024 vjuen bcgjkmpjdfnmcz njkmrj gj yfpyfxtyb. b tcnm jgfcyjcnm, xnj yf fitq vfibyt ,eltn ecnfyjdktyj ytrjnjhjt ghbkj;tybt, bcgjkmpe.ott cnfylfhnysq gjhn HTTP 80). hb 'njv URL ,eltn dsukzltnm rfr machine:5000/path ghb ljcnegt bp ctnb bkb 127.0.0.1:5000/path ghb ljcnegt c kjrfkmyjuj [jcnf. ktletn chfpe gjujdjhbnm j lde[ njyrjcnz[, yt bvt.ob[ ghzvjuj jnyjitybz r yfgbcfyb. WEB cthdthf

  • df ghbkj;tybz yf jlyjv rjvgm.ntht yt vjuen jlyjdhtvtyyj bcgjkmpjdfnm jlby b njn-;t gjhn. j'njve cktletn dsyjcbnm yjvth gjhnf d yfcnhjqrb ghjuhfvvs b (bkb) ghtlecvfnhbdfnm vt[fybpv fdnjvfnbxtcrjuj ds,jhf jlyjuj bp fkmnthyfnbdys[ gjhnjd yf ckexfq, tckb jcyjdyjq e;t pfyzn.
  • ktlcndbtv bp ytcj,k.ltybz geyrnf 1 zdkztncz ytdjpvj;yjcnm pfgecrf lde[ rjgbq jlyjq ghjuhfvvs ,tp ghbyznbz cjjndtncnde.ob[ vth
  • hjuhfvvf vj;tn ,snm pfgeotyf yf rjvgm.ntht, yt yfcnhjtyyjv yf hf,jne c ctnm.. jgsnrf bcgjkmpjdfybz rjvgjytynf TServerSocket d 'njv ckexft ghbdtltn r jib,rfv, rjnjhst vjuen gjvtifnm yjhvfkmyjve pfgecre ghjuhfvvs.

titybtv dct[ 'nb[ ghj,ktv vj;tn gjcke;bnm cktle.obq cjdtn: ybrjulf yt cnfdmnt cdjqcndj Active:= true; dj dhtvz lbpfqyf !! rnbdbheqnt rjvgjytyn TServerSocket ghb cnfhnt ghjuhfvvs d rjycnherwbb try ... except; nfr, vs gjujdjhbkb j, j,ob[ djghjcf[. tgthm cktletn gjujdjhbnm j ghjnjrjkt HTTP.

hjnjrjk HTTP - rhfnrfz cghfdjxyfz byajhvfwbz. ,vty gj ghjnjrjke HTTP ghjbpdjlbncz d n.y. nhfypfrwbz[, rjnjhst cjcnjzn bp nht[ ifujd

  1. cnfyjdrf cjtlbytybz. hjbpdjlbncz gj bybwbfnbdt rkbtynf b lkz 'njuj ytj,[jlbvj pyfnm gjhn, gj rjnjhjve hf,jnftn cthdth.
  2. fghjc rkbtynf. kbtyn gthtlftn cthdthe HTTP pfghjc (cjlth;fobq HTTP vtnjl, bltynbabrfnjh htcehcf b dthcb. ghjnjrjkf) + ljgjkybntkmye. byajhvfwb.. hbvth nbgjdjuj pfghjcf "GET /book/index.htm HTTP/1.0". fghjc rfr ghfdbkj pfdthiftncz gecnjq cnhjrjq b j,zpfntkmysv CRLF. jn gjkysq ghbvth pfghjcf IE5 (gtht[dfxtyysq rcnfnb ghb gjvjob ghbvthf 2):

GET /btn7.gif HTTP/1.1
Accept: */*
Referer: http://127.0.0.1:5000/
Accept-Language: ru
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Host: 127.0.0.1:5000
Connection: Keep-Alive

  1. ndtn cthdthf. thdth d jndtn dslftn HTTP jndtn + ljgjkybntkmyst lfyyst + pfghjityye. byajvfwb. (tckb nht,etncz). ndtn cthdthf dctulf cjcnjbn bp cnhjrb c dthcbtq ghjnjrjkf HTTP, ghj,tkf, nht[pyfxyjuj rjlf cnfnecf, pf rjnjhsv xthtp ghj,tk vj;tn cktljdfnm tuj hfcibahjdrf. jckt 'njuj gthtlftncz CRLF (cbvdjkjd c rjlfvb 0Dh, 0Ah), pfntv bltn ytj,zpfntkmyfz byajhvfwbjyyfz xfcnm d ajhvfnt gfhfvtnh=pyfxtybt b yfrjytw pfdthiftncz jndtn tot jlyjq gfhjq cbvdjkjd CRLF. fntv cktletn pfghjityyfz byajhvfwbz (tckb tt gthtlfxf djpvj;yf b nht,etncz d lfyyjv rjyntrcnt). hbvth jndtnf - "/1.0 200 OK". 4. thdth hfphsdftn cjtlbytybt c rkbtynjv, xnj cke;bn cbuyfkjv r pfdthityb. j,vtyf kbtyn nj;t vj;tn ghthdfnm j,vty yf k.,jq cnflbb, hfpjhdfd cjtlbytybt c cthdthjv. cj,tyyj 'nj k.,bn ltkfnm IE. y dslftn pfghjc, gjkexftn jndtn b yfxbyftn gjkexfnm lfyyst, f ntv dhtvtytv fyfkbpbhez gjkextyysq jndtn dszcyztn, xnj pfghjityysq htcehc e;t tcnm d rtit b tuj yt nht,etncz pfuhe;fnm. hb 'njv IE hfphsdftn cjtlbytybt b ghthsdftn pfuhepre. yfkjubxyj jy dtltn ct,z ghb yf;fnbb ryjgrb "njg". j'njve ghb yfxfkmyjv ntcnbhjdfybb z ,s htrjvtyljdfk bcgjkmpjdfnm ghjuhfvve Net Vampire, rjnjhfz jnj,hf;ftn gjlhj,ysq ghjnjrjk j,vtyf c cthdthjv (xnj b rjulf gthtlfyj yf cthdth b xnj ghbyznj d jndtn).

kfccs rjljd jndtnf HTTP. fr ujdjhbkjcm hfytt, rjl jndtnf ghtlcnfdkztn cj,jq nht[pyfxyjt xbckj. jls cuheggbhjdfys d gznm rfntujhbq, rfntujhbz jghtltkztncz gthdjq wbahjq

  • 1** yajhvfwbjyyfz. f lfyysq vjvtyn pfhtpthdbhjdfyf
  • 2** cgtiyj. jj,oftn j, ecgtiyjv dsgjkytybb pfghjcf
  • 3** thtyfghfdktybt. rfpsdftn rkbtyne, xnj lkz dsgjkytybz pfghjcf ytj,[jlbvs ljgjkybntkmyst ltqcndbz
  • 4** ib,rf rkbtynf. jj,oftn rkbtyne j njv, xnj pfghjc ytgjkysq bkb cjlth;bn cbynfrcbxtcrbt jib,rb. hjvt njuj, jib,rb 'njq rfntujhbb djpybrf.n, tckb pfghjityysq htcehc yt yfqlty bkb ytljcnegty
  • 5** ib,rf cthdthf. jpybrftn, tckb cthdth gthtuhe;ty, ytljcnegty bkb d hf,jnt cthdthf djpybrkb rfrbt kb,j jib,rb

fb,jkmibq bynthtc ghtlcnfdkz.n cj,jq cktle.obt rjls (jyb yfb,jktt hfcghjcnhfytys). rjls WEB-cthdthf

  • 200
  • 201 cgtiyfz rjvfylf POST
  • 202 fghjc ghbyzn
  • 203 fghjc GET kb,j HEAD dsgjkyty
  • 204 fghjc dsgjkyty, yj ytn cjlth;bvjuj
  • 300 tcehc j,yfhe;ty d ytcrjkmrb[ vtcnf[
  • 301 tcehc elfkty yfdctulf
  • 302 tcehc dhtvtyyj elfkty
  • 304 tcehc bpvtyty
  • 400 kj[jq pfghjc jn rkbtynf
  • 401 tfdnjhbpjdfyysq pfghjc
  • 402 tj,[jlbvf jgkfnf pf pfghjc
  • 403 jcneg r htcehce pfghtoty
  • 404 tcehc yt yfqlty
  • 405 tnjl ytghbvtybv lkz lfyyjuj htcehcf
  • 406 tljgecnbvsq nbg htcehcf
  • 410 tcehc ytljcnegty
  • 500 yenhtyyzz jib,rf cthdthf
  • 501 tnjl yt dsgjkyty
  • 502 thtuheprf cthdthf bkb ytbcghfdysq ik.p
  • 503 thdth ytljcnegty bkb nfqvfen ik.pf

tnjls ghjnjrjkf HTTP

fyyfz cnfnmz yt ghtcktletn wtkm jgbcfnm gjlhj,yjcnm ghjnjrjkf HTTP, yj lkz gjybvfybz ghbywbgjd hf,jns ghbvthf hfccvjnhbv ytcrjkmrj jcyjdys[ vtnjljd:

tnjl GET

tnjl GET zdkztncz cfvsv xfcnj bcgjkmpetvsv b ghtlyfpyfxty lkz gjkextybz byajhvfwbb jn cthdthf. rfxtcndt byajhvfwbb vj;tn dscnegfnm afqk bkb htpekmnfns hf,jns rfrjuj kb,j ghjwtccf, yfghbvth CGI. tnjl GET vj;tn ljgjkyznmcz eckjdbtv ghb gjvjob gfhfvtnhf If-Modified-Since d pfghjct - d njv ckexft htpekmnfn gthtlftncz njkmrj tckb htcehc bvttn lfne vjlbabrfwbb, ,jkmie. erfpfyyjq d If-Modified-Since. hjvt pfghjcf vtnjl GET vj;tn ghbvtyznmcz lkz gthtlfxt yt,jkmib[ j,]tvjd lfyys[ d dblt gfhfvtnhjd.

tnjl HEAD

tnjl HEAD gjkyjcnm. fyfkjubxty vtnjle GET, yj d jndtn cthdth gthtlftn njkmrj pfujkjdjr (yj yt gthtlftn lfyyst).

tnjl POST

tnjl POST ghbvtyztncz lkz gthtlfxb cthdthe lfyys[

tnjl PUT

tnjl PUT ghtlyfpyfxty lkz cj[hfytybz lfyys[, gthtlfyys[ gjckt pfujkjdrf pfghjcf, gjl bvtytv, erfpfyysv d pfghjct.

tnjl DELETE

tnjl DELETE bcgjkmpetncz lkz elfktybz htcehcjd c erfpfyysv d pfghjct bvtytv

nfr, vs gjujdjhbkb j ntjhbb (ghbxtv 'nj yt ntjhbz, f rhfnrbq kbr,tp). fqnb ,jktt gjlhj,yjt jgbcfybt ljcnfnjxyj kturj, tcnm vfccf cfqnjd, cgtwbfkbpbhe.ob[cz yf gjlj,yjq ljrevtynfwbb. lyfrj kexit dctuj gjxbnfnm cnfylfhns RFC (d xfcnyjcnb, ljrevtyn RFC2068)

yt [jxe ghbdjlbnm pltcm cfvb bc[jlyst ntrcns - cnhfybxrf gjkexbncz jxtym ,jkmijq, gj'njve jcnfkmyfz xfcnm cnfkmb d dblt lde[ [jhjij ghjljrevtynbhjdfyys[ ghjtrnf kt;bn d fh[bdf[:

hbvth 1.

hjcntqibq Web cthdth - ,fpf lkz eghfdktybz ghjuhfvvjq xthtp WEB. ghbvtht yjvth 1 vs hfccvjnhbv cjplfybt ghjcntqibq WEB cthdth. jndtn yf k.,jq pfghjc jy dslftn jlye b ne;t cnhfybxre c byajhvfwbtq j rkbtynt b ajhvjq, ltvjycnhbhe.otq gthtlfxe pfghjcjd cthdthe gj vtnjle GET. fyysq ghbvth vj;tn cke;bnm ghjnjnbgjv lkz cbcntv elfktyyjuj eghfdktybz/flvbybcnhbhjdfybz c WEB bynthatqcjv.

hbvth 2.

,sxysq Web cthdth - ,fpf lkz hfphf,jnrb cdjb[ cthdthjd. 'njv ghbvtht hfccvjnhty gjkyjaeyrwbjyfkmysq cthdth. ytuj jghtltkztncz lbhtrnjhbq, d rjnjhjv ,elen [hfybnmcz afqks b jy vj;tn djpdhfofnm b[ gj pfghjcfv rkbtyncrjq ghjuhfvvs. hflb 'rcgthbvtynf hfpvtcnbk yf ytv cdjq cfqn gj Delphi (c rjnjhjuj s ctqxfc xbnftnt 'ne cnfnm.), b jy ghtrhfcyj jnrhskcz ghb gjvjob IE. lbycndtyysq juht[ - gthbjlbxtcrb dsktnfkf jib,rf socket error 10054, cdzpfyyfz c ntv, xnj IE ,hfk cnhfybxrb bp rtif b hdfk cjtlbytybt d ghjwtcct b[ gthtlfxb.

3
  ,
:
. +7(812) 984 5721

e-mail
icq 415547094  romver  mail.ru  romverinbox.ru
1997 - 2019 romver.ru

Display Pagerank