Top Banner

of 12

Computer network anf Http protocol

Aug 07, 2018

Download

Documents

Zafer Atakan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/20/2019 Computer network anf Http protocol

    1/31

    HTTP ProtocolInstructor: Prof. Dr. Friedbert Kaspar

    Mai Nam Chuong

    !" #I$ %&'% ( Computer Net)or*s

  • 8/20/2019 Computer network anf Http protocol

    2/31

    ∗De+nitions

    ∗HTTP Communication chain

    ∗HTTP Transport binding

    ∗HTTP Methods

    ∗HTTP Messages

    ∗HTTP $tatus Codes

    ∗HTTP Caching

    ∗,-

    genda

    %

  • 8/20/2019 Computer network anf Http protocol

    3/31

    set of rules and regulations thatdetermine ho) data istransmitted.

    Communication Protocol/

    0

  • 8/20/2019 Computer network anf Http protocol

    4/31

    1 2$I la3ers

    HTTP4 $MTP4 FTP4

    DN$5

    6

  • 8/20/2019 Computer network anf Http protocol

    5/31

    pplication 7s. pplication la3er∗ pplication la3er pro7ides ser7icesfor user applications to use. 2r4

    ∗ "ser applications use protocols that

    reside at the application la3er.∗ 89: Internet 89plorer ( HTTP 2utloo*

    ( $MTP

    pplication la3er/

    ;

  • 8/20/2019 Computer network anf Http protocol

    6/31

    ∗H3perte9t Transfer Protocol∗ an applicationFC

  • 8/20/2019 Computer network anf Http protocol

    7/31

    HTTP protocol/

    1

  • 8/20/2019 Computer network anf Http protocol

    8/31

    Histor3∗ 'BB& ( HTTPA&.B∗ 'BB? ( HTTPA'.&

    ∗ 'BBB ( HTTPA'.'

    ∗ Ne9t HTTPA%.& =draft@

    HTTP protocol/

  • 8/20/2019 Computer network anf Http protocol

    9/31

    ∗ The HTTP protocol is areuestAresponse protocol

    ∗ client sends a reuest to theser7er

    ∗ The ser7er responds data

    HTTP Communication

    chain

    >euest

    >esponse

    HTTP Client HTTP $er7erB

  • 8/20/2019 Computer network anf Http protocol

    10/31

    ∗HTTP >euestA>esponse Chain

    )ith Intermediaries

    HTTP Communication

    chain

    >euest

    >esponse

    HTTP ClientHTTP $er7erIntermediar3

    >euest

    >esponse

    Pro93!ate)a3

    '&

  • 8/20/2019 Computer network anf Http protocol

    11/31

    ∗Do not remember pre7iousreuestAresponse chain

    HTTP stateless protocol

    >euest '

    >esponse '

    HTTP Client HTTP $er7er

    >euest %>esponse %

    Ho) to maintain state/

    ''

  • 8/20/2019 Computer network anf Http protocol

    12/31

    ∗ Transitor3 connection∗ 2ne connection is created for each

    reuestAresponse

    ∗Persistent connection

    ∗  The connection is *ept open after eachreuestAresponse set until the client isdone reuesting all the documents.

    HTTP Transport binding

    '%

  • 8/20/2019 Computer network anf Http protocol

    13/31

  • 8/20/2019 Computer network anf Http protocol

    14/31

    ∗GET < >euests data from aspeci+ed resource

    ∗POST < $ubmits data to beprocessed to a speci+ed resource

    HTTP !8T 7s. P2$T

    '6

  • 8/20/2019 Computer network anf Http protocol

    15/31

    HTTP !8T 7s. P2$T

    ';

  • 8/20/2019 Computer network anf Http protocol

    16/31

    ∗Communication bet)een de7icesusing the HTTP ta*es place7ia HTTP messages

    ∗ T)o t3pes:requests and responses.

    ∗ Te9t

  • 8/20/2019 Computer network anf Http protocol

    17/31

    HTTP >euest Message

    '1

  • 8/20/2019 Computer network anf Http protocol

    18/31

  • 8/20/2019 Computer network anf Http protocol

    19/31

    ∗Host:

    ∗$peci+es the Internet host

    ∗Host: ))).7gu.edu.7n:&&

    ∗User-A!ent∗$peci+es )hat agent =application@ is sending thereuest

    ∗"ser

  • 8/20/2019 Computer network anf Http protocol

    20/31

    HTTP >esponse Message

    %&

  • 8/20/2019 Computer network anf Http protocol

    21/31

    ∗Ser%er

    ∗ $er7er info that ser7es the reuest∗ $er7er: pacheA%.6.' ="ni9@

    ∗E&pres∗ gi7es the dateAtime after )hich the response is

    considered

    ∗ 89pires: Thu4 %& ul %&'0 '?:&&:&& !MT

    ∗Re$resh∗ "sed in redirection4 or )hen a ne) resource has been

    created.

    >efresh: ; urlJhttp:AA))).7gu.edu.7n

    HTTP >esponse Headers

    %'

  • 8/20/2019 Computer network anf Http protocol

    22/31

    ∗'&& (In$oratona) >euest recei7ed4 ser7er is

    continuing the process.∗+&& (S"ccess): The reuest )as successfull3

    recei7ed4 understood4 accepted and ser7iced.

    ∗,&& (Redrecton): Further action must be ta*en inorder to complete the reuest.

    ∗&& (Cent Error): The reuest contains bad s3nta9or cannot be understood.

    ∗.&& (Ser%er Error): The ser7er failed to ful+ll anapparentl3 7alid reuest.

    HTTP $tatus codes

    %%

  • 8/20/2019 Computer network anf Http protocol

    23/31

    ∗+// O0 : The reuest is ful+lled.

    ∗,/' 1o%e Peranent2: Theresource reuested for has beenpermanentl3 mo7ed to a ne)

    location∗,/ Not 1od3ed: $er7er noti+es

    that the resource reuested has notbeen modi+ed.

    Common HTTP $tatus

    codes

    %0

  • 8/20/2019 Computer network anf Http protocol

    24/31

    ∗// 4ad Re5"est: $er7er could notunderstand the reuest =s3nta9 error@.

    ∗/' A"thentcaton Re5"red: Thereuested resource is protected4 andreuire clientLs credential.

    ∗/, 6or7dden: $er7er refuses tosuppl3 the resource4 regardless ofidentit3 of client.

    ∗/ Not 6o"nd: The reuested

    resource cannot be found in the ser7er.

    Common HTTP $tatus

    codes

    %6

  • 8/20/2019 Computer network anf Http protocol

    25/31

    ∗.// Interna Ser%er Error: $er7er iserror in the ser7er

  • 8/20/2019 Computer network anf Http protocol

    26/31

  • 8/20/2019 Computer network anf Http protocol

    27/31

    ∗Cache: local cop3 of a resource

    HTTP Caching

    >euest

    >esponse

    HTTP ClientIntermediar3

    >euest

    >esponse

    HTTP $er7er

    %1

  • 8/20/2019 Computer network anf Http protocol

    28/31

  • 8/20/2019 Computer network anf Http protocol

    29/31

    ∗alidation Model∗ hen the resource last changed/

    ∗ 8liminate full response to client

    ∗ >educe net)or* band)idth

    ∗ If

  • 8/20/2019 Computer network anf Http protocol

    30/31

    ∗>FC

  • 8/20/2019 Computer network anf Http protocol

    31/31

    ,-

    0'