SlideShare uma empresa Scribd logo
1 de 36
CChhaapptteerr 2222 
WWoorrlldd WWiiddee WWeebb:: 
HHTTTTPP 
Objectives 
Upon completion you will be able to: 
• Understand the components of a browser and a server 
• Understand the function of the URL and cookies 
• Understand how HTML is related to static documents 
• Understand how CGI is related to dynamic documents 
• Understand how Java is related to active documents 
• Know how HTTP accesses data on the WWW 
TCP/IP Protocol Suite 1
22.1 ARCHITECTURE 
The WWW is a distributed client-server service, in which aa cclliieenntt uussiinngg aa 
bbrroowwsseerr ccaann aacccceessss aa sseerrvviiccee uussiinngg aa sseerrvveerr.. TThhee sseerrvviiccee pprroovviiddeedd iiss 
ddiissttrriibbuutteedd oovveerr mmaannyy llooccaattiioonnss ccaalllleedd ssiitteess.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
CClliieenntt ((BBrroowwsseerr)) 
SSeerrvveerr 
UUnniiffoorrmm RReessoouurrccee LLooccaattoorr ((UURRLL)) 
CCooookkiieess 
TCP/IP Protocol Suite 2
Figure 22.1 Architecture of WWW 
TCP/IP Protocol Suite 3
Figure 22.2 Browser 
TCP/IP Protocol Suite 4
Figure 22.3 URL 
TCP/IP Protocol Suite 5
22.2 WEB DOCUMENTS 
The documents in the WWW can be grouped into tthhrreeee bbrrooaadd ccaatteeggoorriieess:: 
ssttaattiicc,, ddyynnaammiicc,, aanndd aaccttiivvee.. TThhee ccaatteeggoorryy iiss bbaasseedd oonn tthhee ttiimmee tthhee 
ccoonntteennttss ooff tthhee ddooccuummeenntt aarree ddeetteerrmmiinneedd.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
SSttaattiicc DDooccuummeennttss 
DDyynnaammiicc DDooccuummeennttss 
AAccttiivvee DDooccuummeennttss 
TCP/IP Protocol Suite 6
Figure 22.4 Static document 
TCP/IP Protocol Suite 7
Figure 22.5 Boldface tags 
TCP/IP Protocol Suite 8
Figure 22.6 Effect of boldface tags 
TCP/IP Protocol Suite 9
Figure 22.7 Beginning and ending tags 
TCP/IP Protocol Suite 10
Figure 22.8 Dynamic document using CGI 
TCP/IP Protocol Suite 11
Figure 22.9 Dynamic document using server-site script 
TCP/IP Protocol Suite 12
NNoottee:: 
Dynamic documents are sometimes 
referred to as server-site dynamic 
documents. 
TCP/IP Protocol Suite 13
Figure 22.10 Active document using Java applet 
TCP/IP Protocol Suite 14
Figure 22.11 Active document using client-site script 
TCP/IP Protocol Suite 15
NNoottee:: 
Active documents are sometimes 
referred to as client-site dynamic 
documents. 
TCP/IP Protocol Suite 16
22.3 HTTP 
The Hypertext Transfer Protocol (HTTP) is a protocol uusseedd mmaaiinnllyy ttoo 
aacccceessss ddaattaa oonn tthhee WWoorrlldd WWiiddee WWeebb.. HHTTTTPP ffuunnccttiioonnss lliikkee aa ccoommbbiinnaattiioonn 
ooff FFTTPP aanndd SSMMTTPP.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
HHTTTTPP TTrraannssaaccttiioonn 
PPeerrssiisstteenntt vveerrssuuss NNoonnppeerrssiisstteenntt CCoonnnneeccttiioonn 
PPrrooxxyy SSeerrvveerr 
TCP/IP Protocol Suite 17
NNoottee:: 
HTTP uses the services of TCP on 
well-known port 80. 
TCP/IP Protocol Suite 18
Figure 22.12 HTTP transaction 
TCP/IP Protocol Suite 19
Figure 22.13 Request and response messages 
TCP/IP Protocol Suite 20
Figure 22.14 Request and status lines 
TCP/IP Protocol Suite 21
TTaabbllee 2222..11 MMeetthhooddss 
TCP/IP Protocol Suite 22
TTaabbllee 2222..22 SSttaattuuss ccooddeess 
TCP/IP Protocol Suite 23
TTaabbllee 2222..22 SSttaattuuss ccooddeess ((ccoonnttiinnuueedd)) 
TCP/IP Protocol Suite 24
Figure 22.15 Header format 
TCP/IP Protocol Suite 25
TTaabbllee 2222..33 GGeenneerraall hheeaaddeerrss 
TCP/IP Protocol Suite 26
TTaabbllee 2222..44 RReeqquueesstt hheeaaddeerrss 
TCP/IP Protocol Suite 27
TTaabbllee 2222..55 RReessppoonnssee hheeaaddeerrss 
TCP/IP Protocol Suite 28
TTaabbllee 2222..66 EEnnttiittyy hheeaaddeerrss 
TCP/IP Protocol Suite 29
ExamplE 1 
This example retrieves a document. We use the GET method to 
retrieve an image with the path /usr/bin/image1. The request 
line shows the method (GET), the URL, and the HTTP version 
(1.1). The header has two lines that show that the client can 
accept images in the GIF or JPEG format. The request does 
not have a body. The response message contains the status line 
and four lines of header. The header lines define the date, 
server, MIME version, and length of the document. The body 
of the document follows the header (see Figure 22.16). 
See Next Slide 
TCP/IP Protocol Suite 30
Figure 22.16 Example 1 
TCP/IP Protocol Suite 31
ExamplE 2 
In this example, the client wants to send data to the server. We 
use the POST method. The request line shows the method 
(POST), URL, and HTTP version (1.1). There are four lines of 
headers. The request body contains the input information. The 
response message contains the status line and four lines of 
headers. The created document, which is a CGI document, is 
included as the body (see Figure 22.17). 
See Next Slide 
TCP/IP Protocol Suite 32
Figure 22.17 Example 2 
TCP/IP Protocol Suite 33
ExamplE 3 
HTTP uses ASCII characters. A client can directly connect to 
a server using TELNET, which logs into port 80. The next 
three lines shows that the connection is successful. We then 
type three lines. The first shows the request line (GET method), 
the second is the header (defining the host), the third is a blank 
terminating the request. The server response is seven lines 
starting with the status line. The blank line at the end 
terminates the server response. The file of 14230 lines is 
received after the blank line (not shown here). The last line is 
the output by the client. 
See Next Slide 
TCP/IP Protocol Suite 34
ExamplE 3 
$ telnet www.mhhe.com 80 
Trying 198.45.24.104... 
Connected to www.mhhe.com (198.45.24.104). 
Escape character is '^]'. 
GET /engcs/compsci/forouzan HTTP/1.1 
From: forouzanbehrouz@fhda.edu 
HTTP/1.1 200 OK 
Date: Thu, 28 Oct 2004 16:27:46 GMT 
Server: Apache/1.3.9 (Unix) ApacheJServ/1.1.2 PHP/4.1.2 PHP/3.0.18 
MIME-version:1.0 
Content-Type: text/html 
Last-modified: Friday, 15-Oct-04 02:11:31 GMT 
Content-length: 14230 
Connection closed by foreign host. 
TCP/IP Protocol Suite 35
NNoottee:: 
HTTP version 1.1 specifies a persistent 
connection by default. 
TCP/IP Protocol Suite 36

Mais conteúdo relacionado

Mais procurados (20)

Chap 08 ip
Chap 08 ipChap 08 ip
Chap 08 ip
 
Chap 14 rip, ospf
Chap 14 rip, ospfChap 14 rip, ospf
Chap 14 rip, ospf
 
Chap 09 icmp
Chap 09 icmpChap 09 icmp
Chap 09 icmp
 
Chap 27 next generation i pv6
Chap 27 next generation i pv6Chap 27 next generation i pv6
Chap 27 next generation i pv6
 
Chap 28 security
Chap 28 securityChap 28 security
Chap 28 security
 
Chap 13 stream control transmission protocol
Chap 13 stream control transmission protocolChap 13 stream control transmission protocol
Chap 13 stream control transmission protocol
 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
 
Chap 25 multimedia
Chap 25 multimediaChap 25 multimedia
Chap 25 multimedia
 
Chap 23 ip over atm
Chap 23 ip over atmChap 23 ip over atm
Chap 23 ip over atm
 
Chap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packetsChap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packets
 
Chap 05 ip addresses classfless
Chap 05 ip addresses classflessChap 05 ip addresses classfless
Chap 05 ip addresses classfless
 
Chap 04 ip addresses classful
Chap 04 ip addresses classfulChap 04 ip addresses classful
Chap 04 ip addresses classful
 
Meeting 7 : host configuration: dhcp
Meeting 7 : host configuration: dhcpMeeting 7 : host configuration: dhcp
Meeting 7 : host configuration: dhcp
 
Ch21
Ch21Ch21
Ch21
 
Telnet configuration
Telnet configurationTelnet configuration
Telnet configuration
 
Meeting 6 : ftp
Meeting 6 : ftpMeeting 6 : ftp
Meeting 6 : ftp
 
Chap 11
Chap 11Chap 11
Chap 11
 
FTP & TFTP
FTP & TFTPFTP & TFTP
FTP & TFTP
 
Udp
UdpUdp
Udp
 
Puertos tcp & udp
Puertos tcp & udpPuertos tcp & udp
Puertos tcp & udp
 

Destaque (12)

Chap 26 vpn
Chap 26 vpnChap 26 vpn
Chap 26 vpn
 
28 Network Management_SNMP
28 Network Management_SNMP28 Network Management_SNMP
28 Network Management_SNMP
 
Chapter 27
Chapter 27Chapter 27
Chapter 27
 
Chap 18 telnet
Chap 18 telnetChap 18 telnet
Chap 18 telnet
 
Pengenalan IP
Pengenalan IPPengenalan IP
Pengenalan IP
 
Ip address
Ip addressIp address
Ip address
 
Chap 03 underlying technology
Chap 03 underlying technologyChap 03 underlying technology
Chap 03 underlying technology
 
Chap 15 multicasting
Chap 15 multicastingChap 15 multicasting
Chap 15 multicasting
 
Snmp
SnmpSnmp
Snmp
 
Static dynamic and active web pages
Static dynamic and active web pagesStatic dynamic and active web pages
Static dynamic and active web pages
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 

Semelhante a Chap 22 www http

Semelhante a Chap 22 www http (20)

Chap-22.ppt
Chap-22.pptChap-22.ppt
Chap-22.ppt
 
PowerPoint_merge (2).pdf
PowerPoint_merge (2).pdfPowerPoint_merge (2).pdf
PowerPoint_merge (2).pdf
 
PowerPoint_merge.ppt
PowerPoint_merge.pptPowerPoint_merge.ppt
PowerPoint_merge.ppt
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
unit 3 ns.ppt
unit 3 ns.pptunit 3 ns.ppt
unit 3 ns.ppt
 
Networking in python by Rj
Networking in python by RjNetworking in python by Rj
Networking in python by Rj
 
UDP and TCP header.ppt
UDP and TCP header.pptUDP and TCP header.ppt
UDP and TCP header.ppt
 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
 
Ch27
Ch27Ch27
Ch27
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Ftp
FtpFtp
Ftp
 
How does internet works
How does internet worksHow does internet works
How does internet works
 
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSComputer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
 
Chap 18 telnet
Chap 18 telnetChap 18 telnet
Chap 18 telnet
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnet
 
Network protocols
Network protocolsNetwork protocols
Network protocols
 
CCNA RS_NB - Chapter 5
CCNA RS_NB - Chapter 5CCNA RS_NB - Chapter 5
CCNA RS_NB - Chapter 5
 
transfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imaptransfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imap
 
#KPC #CST #Protocols
#KPC #CST #Protocols #KPC #CST #Protocols
#KPC #CST #Protocols
 
Transportlayer.ppt
Transportlayer.pptTransportlayer.ppt
Transportlayer.ppt
 

Mais de Noctorous Jamal

Lecture 8 The Communication System Finalterm Slides
Lecture 8  The Communication System Finalterm SlidesLecture 8  The Communication System Finalterm Slides
Lecture 8 The Communication System Finalterm SlidesNoctorous Jamal
 
Lecture 7 The Communication System Finalterm Slides
Lecture 7  The Communication System Finalterm SlidesLecture 7  The Communication System Finalterm Slides
Lecture 7 The Communication System Finalterm SlidesNoctorous Jamal
 
Lecture 6 The Communication System Finalterm Slides
Lecture 6  The Communication System Finalterm SlidesLecture 6  The Communication System Finalterm Slides
Lecture 6 The Communication System Finalterm SlidesNoctorous Jamal
 

Mais de Noctorous Jamal (6)

Chap 16 bootp & dhcp
Chap 16 bootp & dhcpChap 16 bootp & dhcp
Chap 16 bootp & dhcp
 
Chap 10 igmp
Chap 10 igmpChap 10 igmp
Chap 10 igmp
 
Chap 01 intro
Chap 01 introChap 01 intro
Chap 01 intro
 
Lecture 8 The Communication System Finalterm Slides
Lecture 8  The Communication System Finalterm SlidesLecture 8  The Communication System Finalterm Slides
Lecture 8 The Communication System Finalterm Slides
 
Lecture 7 The Communication System Finalterm Slides
Lecture 7  The Communication System Finalterm SlidesLecture 7  The Communication System Finalterm Slides
Lecture 7 The Communication System Finalterm Slides
 
Lecture 6 The Communication System Finalterm Slides
Lecture 6  The Communication System Finalterm SlidesLecture 6  The Communication System Finalterm Slides
Lecture 6 The Communication System Finalterm Slides
 

Último

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 

Último (20)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 

Chap 22 www http

  • 1. CChhaapptteerr 2222 WWoorrlldd WWiiddee WWeebb:: HHTTTTPP Objectives Upon completion you will be able to: • Understand the components of a browser and a server • Understand the function of the URL and cookies • Understand how HTML is related to static documents • Understand how CGI is related to dynamic documents • Understand how Java is related to active documents • Know how HTTP accesses data on the WWW TCP/IP Protocol Suite 1
  • 2. 22.1 ARCHITECTURE The WWW is a distributed client-server service, in which aa cclliieenntt uussiinngg aa bbrroowwsseerr ccaann aacccceessss aa sseerrvviiccee uussiinngg aa sseerrvveerr.. TThhee sseerrvviiccee pprroovviiddeedd iiss ddiissttrriibbuutteedd oovveerr mmaannyy llooccaattiioonnss ccaalllleedd ssiitteess.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: CClliieenntt ((BBrroowwsseerr)) SSeerrvveerr UUnniiffoorrmm RReessoouurrccee LLooccaattoorr ((UURRLL)) CCooookkiieess TCP/IP Protocol Suite 2
  • 3. Figure 22.1 Architecture of WWW TCP/IP Protocol Suite 3
  • 4. Figure 22.2 Browser TCP/IP Protocol Suite 4
  • 5. Figure 22.3 URL TCP/IP Protocol Suite 5
  • 6. 22.2 WEB DOCUMENTS The documents in the WWW can be grouped into tthhrreeee bbrrooaadd ccaatteeggoorriieess:: ssttaattiicc,, ddyynnaammiicc,, aanndd aaccttiivvee.. TThhee ccaatteeggoorryy iiss bbaasseedd oonn tthhee ttiimmee tthhee ccoonntteennttss ooff tthhee ddooccuummeenntt aarree ddeetteerrmmiinneedd.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: SSttaattiicc DDooccuummeennttss DDyynnaammiicc DDooccuummeennttss AAccttiivvee DDooccuummeennttss TCP/IP Protocol Suite 6
  • 7. Figure 22.4 Static document TCP/IP Protocol Suite 7
  • 8. Figure 22.5 Boldface tags TCP/IP Protocol Suite 8
  • 9. Figure 22.6 Effect of boldface tags TCP/IP Protocol Suite 9
  • 10. Figure 22.7 Beginning and ending tags TCP/IP Protocol Suite 10
  • 11. Figure 22.8 Dynamic document using CGI TCP/IP Protocol Suite 11
  • 12. Figure 22.9 Dynamic document using server-site script TCP/IP Protocol Suite 12
  • 13. NNoottee:: Dynamic documents are sometimes referred to as server-site dynamic documents. TCP/IP Protocol Suite 13
  • 14. Figure 22.10 Active document using Java applet TCP/IP Protocol Suite 14
  • 15. Figure 22.11 Active document using client-site script TCP/IP Protocol Suite 15
  • 16. NNoottee:: Active documents are sometimes referred to as client-site dynamic documents. TCP/IP Protocol Suite 16
  • 17. 22.3 HTTP The Hypertext Transfer Protocol (HTTP) is a protocol uusseedd mmaaiinnllyy ttoo aacccceessss ddaattaa oonn tthhee WWoorrlldd WWiiddee WWeebb.. HHTTTTPP ffuunnccttiioonnss lliikkee aa ccoommbbiinnaattiioonn ooff FFTTPP aanndd SSMMTTPP.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: HHTTTTPP TTrraannssaaccttiioonn PPeerrssiisstteenntt vveerrssuuss NNoonnppeerrssiisstteenntt CCoonnnneeccttiioonn PPrrooxxyy SSeerrvveerr TCP/IP Protocol Suite 17
  • 18. NNoottee:: HTTP uses the services of TCP on well-known port 80. TCP/IP Protocol Suite 18
  • 19. Figure 22.12 HTTP transaction TCP/IP Protocol Suite 19
  • 20. Figure 22.13 Request and response messages TCP/IP Protocol Suite 20
  • 21. Figure 22.14 Request and status lines TCP/IP Protocol Suite 21
  • 22. TTaabbllee 2222..11 MMeetthhooddss TCP/IP Protocol Suite 22
  • 23. TTaabbllee 2222..22 SSttaattuuss ccooddeess TCP/IP Protocol Suite 23
  • 24. TTaabbllee 2222..22 SSttaattuuss ccooddeess ((ccoonnttiinnuueedd)) TCP/IP Protocol Suite 24
  • 25. Figure 22.15 Header format TCP/IP Protocol Suite 25
  • 26. TTaabbllee 2222..33 GGeenneerraall hheeaaddeerrss TCP/IP Protocol Suite 26
  • 27. TTaabbllee 2222..44 RReeqquueesstt hheeaaddeerrss TCP/IP Protocol Suite 27
  • 28. TTaabbllee 2222..55 RReessppoonnssee hheeaaddeerrss TCP/IP Protocol Suite 28
  • 29. TTaabbllee 2222..66 EEnnttiittyy hheeaaddeerrss TCP/IP Protocol Suite 29
  • 30. ExamplE 1 This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1. The request line shows the method (GET), the URL, and the HTTP version (1.1). The header has two lines that show that the client can accept images in the GIF or JPEG format. The request does not have a body. The response message contains the status line and four lines of header. The header lines define the date, server, MIME version, and length of the document. The body of the document follows the header (see Figure 22.16). See Next Slide TCP/IP Protocol Suite 30
  • 31. Figure 22.16 Example 1 TCP/IP Protocol Suite 31
  • 32. ExamplE 2 In this example, the client wants to send data to the server. We use the POST method. The request line shows the method (POST), URL, and HTTP version (1.1). There are four lines of headers. The request body contains the input information. The response message contains the status line and four lines of headers. The created document, which is a CGI document, is included as the body (see Figure 22.17). See Next Slide TCP/IP Protocol Suite 32
  • 33. Figure 22.17 Example 2 TCP/IP Protocol Suite 33
  • 34. ExamplE 3 HTTP uses ASCII characters. A client can directly connect to a server using TELNET, which logs into port 80. The next three lines shows that the connection is successful. We then type three lines. The first shows the request line (GET method), the second is the header (defining the host), the third is a blank terminating the request. The server response is seven lines starting with the status line. The blank line at the end terminates the server response. The file of 14230 lines is received after the blank line (not shown here). The last line is the output by the client. See Next Slide TCP/IP Protocol Suite 34
  • 35. ExamplE 3 $ telnet www.mhhe.com 80 Trying 198.45.24.104... Connected to www.mhhe.com (198.45.24.104). Escape character is '^]'. GET /engcs/compsci/forouzan HTTP/1.1 From: forouzanbehrouz@fhda.edu HTTP/1.1 200 OK Date: Thu, 28 Oct 2004 16:27:46 GMT Server: Apache/1.3.9 (Unix) ApacheJServ/1.1.2 PHP/4.1.2 PHP/3.0.18 MIME-version:1.0 Content-Type: text/html Last-modified: Friday, 15-Oct-04 02:11:31 GMT Content-length: 14230 Connection closed by foreign host. TCP/IP Protocol Suite 35
  • 36. NNoottee:: HTTP version 1.1 specifies a persistent connection by default. TCP/IP Protocol Suite 36