Your SlideShare is downloading. ×
Http
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Http

769

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
769
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. HTTP və CGIAdil Əliyevhttp://neats.az
  • 2. Məlumat necə ötürülür?
  • 3. Məlumat necə ötürülür?
  • 4. HTTP nə olan şeydir?
  • 5. GETGET / HTTP/1.1Connection: Keep­AliveUser­Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1Accept: text/*, image/jpeg, image/png, image/*, */*Accept­Encoding: x­gzip, gzip, identityAccept­Charset: Any, utf­8, *Accept­Language: en, en_USHost: www.google.com
  • 6. GETHTTP/1.1 200 OKDate: Thu, 24 Jan 2002 17:33:52 GMTServer: Apache/1.3.14Last­Modified: Mon, 21 Jan 2002 22:08:33 GMTEtag: “47bc6­25e0­3c4c9161”Accept­Ranges: bytesContent­Length: 9696Connection: closeContent­Type: text/html­­ blank line­­­­ HTML entity ­­
  • 7. POSTPOST /path/script.cgi HTTP/1.0From: frog@jmarshall.comUser­Agent: HTTPTool/1.0Content­Type: application/x­www­form­urlencodedContent­Length: 32page=index&id=15
  • 8. CGI nədir?
  • 9. CGI http://example.com/toplama.cgi?m=4&n=2...HTTP_ACCEPT="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"HTTP_ACCEPT_CHARSET="ISO­8859­1,utf­8;q=0.7,*;q=0.7"HTTP_ACCEPT_ENCODING="gzip, deflate"HTTP_ACCEPT_LANGUAGE="en­us,en;q=0.5"HTTP_CONNECTION="keep­alive"HTTP_HOST="example.com"HTTP_USER_AGENT="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0"...QUERY_STRING="var1=value1&var2=with%20percent%20encoding"REMOTE_ADDR="127.0.0.1"REMOTE_PORT="63555"REQUEST_METHOD="GET"REQUEST_URI="/toplama.cgi?m=4&n=2"...
  • 10. CGI http://example.com/toplama.cgi?m=4&n=2#include <stdio.h>#include <stdlib.h>int main(void){    char *data;    long m,n;    printf("%s%c%cn", "Content­Type:text/html;charset=utf­8",13,10);    printf("<p>Toplama</p>n");    data = getenv("QUERY_STRING");    sscanf(data,"m=%ld&n=%ld",&m,&n);    printf("<p> %ld + %ld = %ld.",m,n,m*n);    return 0;}
  • 11. CGI və POSTuses dos; var  a:string;  c:char;begin  writeln(Content­Type:text/html,#10#13);   a:=;  while not eof(input) do  begin     read(c);     a:= a+c;  end;    writeln(POST: ,a);end.
  • 12. İstinadlar● RFC 2616 (http://tools.ietf.org/html/rfc2616)● RFC 3875 (http://tools.ietf.org/html/rfc3875)
  • 13. Təşəkkür edirəm!

×