SlideShare a Scribd company logo
1 of 33
Presentation on
Web Technology
Topic: HTTP server and HTTP protocol
Course Code: CSE-502
May 14, 2015 IIT, University of Dhaka 1
Presented by:
Md. Rakib Hossain, BSSE-0516
A. H. M. Azimul Haque, BSSE-0519
Md. Mahbub Islam, BSSE-0510
Md. Rashedul Islam, BSSE-0510
Submitted to:
Mr. Amit Seal Ami
Lecuturer,
Institute of Information Technology
University of Dhaka
May 14, 2015 IIT, University of Dhaka 2
 Is a system of interlinked hypertext documents
 Accessed via the Internet with a web browser
 Client/Server data transfer protocol
 Communication via application level protocol
 Run on standard networking infrastructure
May 14, 2015 IIT, University of Dhaka 3
Internet World Wide Web
 The Internet is a global
system of
interconnected
computer networks.
 Its access is provided by
ISPs.
 It runs applications like
www, ftp, html etc
 Web is collection of text
documents and other
resources, linked by
hyperlinks and URLs
 Usually accessed
by web browsers
 Its an application
running on Internet
May 14, 2015 IIT, University of Dhaka 4
 Web page consists of objects
 Object can be HTML file, JPEG image, Java
applet, audio file,…
 Web page consists of base HTML-file which
includes several referenced objects
 Each object is addressable by a URL
 Example URL:
www.someschool.edu/someDept/pic.gif
host name path name
May 14, 2015 IIT, University of Dhaka 5
<scheme> : //<host> :<port> /<path>
;<parameters> ?<query> #<fragment>
Here
scheme
The protocol you are using
host
Host name or ip number
port
TCP port number that protocol server is using
path
Path and filename reference of object on server
parameters
Any specific parameters that object needs
query
Query string for a CGI program
fragment
Reference to a subset of an object
May 14, 2015 IIT, University of Dhaka 6
HTTP: hypertext transfer
protocol
 Web’s application layer
protocol
 client/server model
 client: browser that
requests, receives,
“displays” Web objects
 server: Web server sends
objects in response to
requests
 HTTP 1.0: RFC 1945
 HTTP 1.1: RFC 2068
PC running
Explorer
Server
running
Apache Web
server
Mac running
Navigator
May 14, 2015 IIT, University of Dhaka 7
Uses TCP:
 client initiates TCP connection
(creates socket) to server, port 80
 server accepts TCP connection from
client
 HTTP messages (application-layer
protocol messages) exchanged
between browser (HTTP client) and
Web server (HTTP server)
 HTTP – not worry about lost data;
taken care of by TCP
 TCP connection closed
HTTP is “stateless”
 server maintains no
information about past
client requests
Protocols that maintain
“state” are complex!
 past history (state) must be
maintained
 if server/client crashes, their
views of “state” may be
inconsistent, must be
reconciled
May 14, 2015 IIT, University of Dhaka 8
HTTP connections
Non-persistent HTTP
 At most one object is sent over a TCP connection.
 HTTP/1.0 uses nonpersistent HTTP
May 14, 2015 IIT, University of Dhaka 9
HTTP connections
Persistent HTTP
 Multiple objects can be sent over single TCP connection
between client and server.
 HTTP/1.1 uses persistent connections in default mode
May 14, 2015 IIT, University of Dhaka 10
Non-persistent HTTP
Suppose user enters URL
www.someSchool.edu/someDepartment/home.index
1a. HTTP client initiates TCP
connection to HTTP server (process)
at www.someSchool.edu on port 80
2. HTTP client sends HTTP request
message (containing URL) into
TCP connection socket. Message
indicates that client wants object
someDepartment/home.index
1b. HTTP server at host
www.someSchool.edu waiting for
TCP connection at port 80.
“accepts” connection, notifying
client
3. HTTP server receives request
message, forms response message
containing requested object, and
sends message into its socket
time
(contains text,
references to 10
jpeg images)
May 14, 2015 IIT, University of Dhaka 11
Non-persistent HTTP
5. HTTP client receives response
message containing html file,
displays html. Parsing html file,
finds 10 referenced jpeg objects
6. Steps 1-5 repeated for each of 10
jpeg objects
4. HTTP server closes TCP connection.
TCP waits and terminates the
connection when it knows that the
message is received by the client
time
Serial vs. parallel TCP connections
May 14, 2015 IIT, University of Dhaka 12
HTTP: Response time
RTT: time to send a small packet to travel
from client to server and back.
May 14, 2015 IIT, University of Dhaka 13
14
Non-Persistent HTTP:
Response time
Response time:
 one RTT to initiate TCP
connection
 one RTT for HTTP request
and first few bytes of HTTP
response to return
 file transmission time
total = 2RTT+transmit time
May 14, 2015 IIT, University of Dhaka 14
Non-Persistent HTTP
Non-persistent HTTP issues:
 requires 2 RTTs per object
 OS overhead for each TCP connection
 browsers often open parallel TCP connections to fetch
referenced objects
 Serious burden on Web server
May 14, 2015 IIT, University of Dhaka 15
Persistent HTTP
Persistent HTTP
 server leaves connection
open after sending
response
 subsequent HTTP
messages between same
client/server sent over open
connection
 Closes connection after
TIMEOUT INTERVAL!!!
May 14, 2015 IIT, University of Dhaka 16
Persistent Connection and
Pipelining
Persistent without pipelining:
 client issues new request only when previous response has
been received
 one RTT for each referenced object
Persistent with pipelining:
 default in HTTP/1.1
 client sends requests as soon as it encounters a referenced
object
 as little as one RTT for all the referenced objects
May 14, 2015 IIT, University of Dhaka 17
Persistent Connection and
Pipelining
May 14, 2015 IIT, University of Dhaka 18
HTTP request message
 two types of HTTP messages: request, response
 HTTP request message:
 ASCII (human-readable format)
GET /somedir/page.html HTTP/1.1
Host: www.someschool.edu
User-agent: Mozilla/4.0
Connection: close
Accept-language:fr
(extra carriage return, line feed)
request line
(GET, POST,
HEAD commands)
header
linesCarriage return,
line feed
indicates end
of message
May 14, 2015 IIT, University of Dhaka 19
HTTP request message
Con…
May 14, 2015 IIT, University of Dhaka 20
HTTP request message:
general format
May 14, 2015 IIT, University of Dhaka 21
Uploading form input
Post method:
 Web page often includes
form input
 Input is uploaded to server
in entity body
URL method:
 Uses GET method
 Input is uploaded in URL
field of request line:
www.somesite.com/animalsearch?monkeys&banana
May 14, 2015 IIT, University of Dhaka 22
Method types
HTTP/1.0
 GET
 POST
 HEAD
 asks server to leave
requested object out of
response
HTTP/1.1
 GET, POST, HEAD
 PUT
 uploads file in entity body
to path specified in URL
field
 DELETE
 deletes file specified in the
URL field
May 14, 2015 IIT, University of Dhaka 23
HTTP response message
HTTP/1.1 200 OK
Connection close
Date: Thu, 06 Aug 1998 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
Last-Modified: Mon, 22 Jun 1998 …...
Content-Length: 6821
Content-Type: text/html
data data data data data ...
status line
(protocol
status code
status phrase)
header
lines
data, e.g.,
requested
HTML file
May 14, 2015 IIT, University of Dhaka 24
HTTP response message
con..
May 14, 2015 IIT, University of Dhaka 25
HTTP response status codes
200 OK
 request succeeded, requested object later in this message
301 Moved Permanently
 requested object moved, new location specified later in this message
(Location:)
400 Bad Request
 request message not understood by server
404 Not Found
 requested document not found on this server
505 HTTP Version Not Supported
In first line in server->client response message.
A few sample codes:
May 14, 2015 IIT, University of Dhaka 26
Trying out HTTP (client
side) for yourself
1. Telnet to your favorite Web server:
Opens TCP connection to port 80
(default HTTP server port) at cis.poly.edu.
Anything typed in sent
to port 80 at cis.poly.edu
telnet cis.poly.edu 80
2. Type in a GET HTTP request:
GET /~ross/ HTTP/1.1
Host: cis.poly.edu
By typing this in (hit carriage
return twice), you send
this minimal (but complete)
GET request to HTTP server
3. Look at response message sent by HTTP server!
May 14, 2015 IIT, University of Dhaka 27
User-server state: cookies
Many major Web sites use cookies
Four components:
1) cookie header line of HTTP response message
2) cookie header line in HTTP request message
3) cookie file kept on user’s host, managed by user’s browser
4) back-end database at Web site
May 14, 2015 IIT, University of Dhaka 28
User-server state: cookies
Example:
 Susan access Internet always from same PC
 She visits a specific e-commerce site for first time
 When initial HTTP requests arrives at site, site creates a
unique ID and creates an entry in backend database for ID
May 14, 2015 IIT, University of Dhaka 29
Cookies: keeping “state”
May 14, 2015 IIT, University of Dhaka 30
Web Cookies
What cookies can bring:
 authorization
 shopping carts
 recommendations
 user session state (Web e-
mail)
Cookies and privacy:
 cookies permit sites to learn a lot
about you
 you may supply name and e-mail to
sites
aside
How to keep “state”:
 Protocol endpoints:
maintain state at
sender/receiver over
multiple transactions
 cookies: http messages
carry stateMay 14, 2015 IIT, University of Dhaka 31
Web caches (proxy server)
 user sets browser: Web
accesses via cache
 browser sends all HTTP
requests to cache
 object in cache: cache
returns object
 else cache requests object
from origin server, then
returns object to client
Goal: satisfy client request without involving origin
server
client
Proxy
server
client
origin
server
origin
server
May 14, 2015 IIT, University of Dhaka 32
More about Web caching
 Cache acts as both
client and server
 Typically cache is
installed by ISP
(university, company,
residential ISP)
Why Web caching?
 Reduce response time for
client request.
 Reduce traffic on an
institution’s access link.
 Internet dense with
caches: enables “poor”
content providers to
effectively deliver content
(but so does P2P file
sharing)
May 14, 2015 IIT, University of Dhaka 33

More Related Content

What's hot

Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servletsvishal choudhary
 
Https presentation
Https presentationHttps presentation
Https presentationpatel jatin
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)k33a
 
Socket programming in Java (PPTX)
Socket programming in Java (PPTX)Socket programming in Java (PPTX)
Socket programming in Java (PPTX)UC San Diego
 
Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Shimona Agarwal
 
HTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeHTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeAbhishek L.R
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocolasimnawaz54
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket LayerNaveen Kumar
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacyPawan Arya
 

What's hot (20)

Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servlets
 
Https presentation
Https presentationHttps presentation
Https presentation
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Ppt of socket
Ppt of socketPpt of socket
Ppt of socket
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Http protocol
Http protocolHttp protocol
Http protocol
 
Http
HttpHttp
Http
 
Http methods
Http methodsHttp methods
Http methods
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Ssl https
Ssl httpsSsl https
Ssl https
 
Socket programming in Java (PPTX)
Socket programming in Java (PPTX)Socket programming in Java (PPTX)
Socket programming in Java (PPTX)
 
Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Hypertext transfer protocol (http)
Hypertext transfer protocol (http)
 
HTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeHTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status Code
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Network layer logical addressing
Network layer logical addressingNetwork layer logical addressing
Network layer logical addressing
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
 

Viewers also liked

Viewers also liked (7)

Lets talk dns
Lets talk dnsLets talk dns
Lets talk dns
 
Chapter 2 v6.3
Chapter 2 v6.3Chapter 2 v6.3
Chapter 2 v6.3
 
Week3 applications
Week3 applicationsWeek3 applications
Week3 applications
 
HTTP
HTTPHTTP
HTTP
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 Application
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
 
6 app-tcp
6 app-tcp6 app-tcp
6 app-tcp
 

Similar to Http

Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfRaghunathan52
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfRaghunathan52
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptVietAnhNguyen337355
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systemsReza Gh
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Syed Ariful Islam Emon
 
Abhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techAbhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techabhishek srivastav
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for DevelopersSvetlin Nakov
 
ip1clientserver model
 ip1clientserver model ip1clientserver model
ip1clientserver modelmonikadeshmane
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptxssuseraf60311
 
Introduction to the World Wide Web
Introduction to the World Wide WebIntroduction to the World Wide Web
Introduction to the World Wide WebAbdalla Mahmoud
 

Similar to Http (20)

Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdf
 
Web Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdfWeb Technologies Notes - TutorialsDuniya.pdf
Web Technologies Notes - TutorialsDuniya.pdf
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
 
Http
HttpHttp
Http
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
 
www and http services
www and http serviceswww and http services
www and http services
 
Appl layer
Appl layerAppl layer
Appl layer
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3
 
Abhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techAbhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_tech
 
Web technology
Web technologyWeb technology
Web technology
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
 
http presentation 1.pptx
http presentation 1.pptxhttp presentation 1.pptx
http presentation 1.pptx
 
ip1clientserver model
 ip1clientserver model ip1clientserver model
ip1clientserver model
 
Www and http
Www and httpWww and http
Www and http
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptx
 
Introduction to the World Wide Web
Introduction to the World Wide WebIntroduction to the World Wide Web
Introduction to the World Wide Web
 
The HTTP and Web
The HTTP and Web The HTTP and Web
The HTTP and Web
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Http

  • 1. Presentation on Web Technology Topic: HTTP server and HTTP protocol Course Code: CSE-502 May 14, 2015 IIT, University of Dhaka 1
  • 2. Presented by: Md. Rakib Hossain, BSSE-0516 A. H. M. Azimul Haque, BSSE-0519 Md. Mahbub Islam, BSSE-0510 Md. Rashedul Islam, BSSE-0510 Submitted to: Mr. Amit Seal Ami Lecuturer, Institute of Information Technology University of Dhaka May 14, 2015 IIT, University of Dhaka 2
  • 3.  Is a system of interlinked hypertext documents  Accessed via the Internet with a web browser  Client/Server data transfer protocol  Communication via application level protocol  Run on standard networking infrastructure May 14, 2015 IIT, University of Dhaka 3
  • 4. Internet World Wide Web  The Internet is a global system of interconnected computer networks.  Its access is provided by ISPs.  It runs applications like www, ftp, html etc  Web is collection of text documents and other resources, linked by hyperlinks and URLs  Usually accessed by web browsers  Its an application running on Internet May 14, 2015 IIT, University of Dhaka 4
  • 5.  Web page consists of objects  Object can be HTML file, JPEG image, Java applet, audio file,…  Web page consists of base HTML-file which includes several referenced objects  Each object is addressable by a URL  Example URL: www.someschool.edu/someDept/pic.gif host name path name May 14, 2015 IIT, University of Dhaka 5
  • 6. <scheme> : //<host> :<port> /<path> ;<parameters> ?<query> #<fragment> Here scheme The protocol you are using host Host name or ip number port TCP port number that protocol server is using path Path and filename reference of object on server parameters Any specific parameters that object needs query Query string for a CGI program fragment Reference to a subset of an object May 14, 2015 IIT, University of Dhaka 6
  • 7. HTTP: hypertext transfer protocol  Web’s application layer protocol  client/server model  client: browser that requests, receives, “displays” Web objects  server: Web server sends objects in response to requests  HTTP 1.0: RFC 1945  HTTP 1.1: RFC 2068 PC running Explorer Server running Apache Web server Mac running Navigator May 14, 2015 IIT, University of Dhaka 7
  • 8. Uses TCP:  client initiates TCP connection (creates socket) to server, port 80  server accepts TCP connection from client  HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server)  HTTP – not worry about lost data; taken care of by TCP  TCP connection closed HTTP is “stateless”  server maintains no information about past client requests Protocols that maintain “state” are complex!  past history (state) must be maintained  if server/client crashes, their views of “state” may be inconsistent, must be reconciled May 14, 2015 IIT, University of Dhaka 8
  • 9. HTTP connections Non-persistent HTTP  At most one object is sent over a TCP connection.  HTTP/1.0 uses nonpersistent HTTP May 14, 2015 IIT, University of Dhaka 9
  • 10. HTTP connections Persistent HTTP  Multiple objects can be sent over single TCP connection between client and server.  HTTP/1.1 uses persistent connections in default mode May 14, 2015 IIT, University of Dhaka 10
  • 11. Non-persistent HTTP Suppose user enters URL www.someSchool.edu/someDepartment/home.index 1a. HTTP client initiates TCP connection to HTTP server (process) at www.someSchool.edu on port 80 2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index 1b. HTTP server at host www.someSchool.edu waiting for TCP connection at port 80. “accepts” connection, notifying client 3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket time (contains text, references to 10 jpeg images) May 14, 2015 IIT, University of Dhaka 11
  • 12. Non-persistent HTTP 5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. HTTP server closes TCP connection. TCP waits and terminates the connection when it knows that the message is received by the client time Serial vs. parallel TCP connections May 14, 2015 IIT, University of Dhaka 12
  • 13. HTTP: Response time RTT: time to send a small packet to travel from client to server and back. May 14, 2015 IIT, University of Dhaka 13
  • 14. 14 Non-Persistent HTTP: Response time Response time:  one RTT to initiate TCP connection  one RTT for HTTP request and first few bytes of HTTP response to return  file transmission time total = 2RTT+transmit time May 14, 2015 IIT, University of Dhaka 14
  • 15. Non-Persistent HTTP Non-persistent HTTP issues:  requires 2 RTTs per object  OS overhead for each TCP connection  browsers often open parallel TCP connections to fetch referenced objects  Serious burden on Web server May 14, 2015 IIT, University of Dhaka 15
  • 16. Persistent HTTP Persistent HTTP  server leaves connection open after sending response  subsequent HTTP messages between same client/server sent over open connection  Closes connection after TIMEOUT INTERVAL!!! May 14, 2015 IIT, University of Dhaka 16
  • 17. Persistent Connection and Pipelining Persistent without pipelining:  client issues new request only when previous response has been received  one RTT for each referenced object Persistent with pipelining:  default in HTTP/1.1  client sends requests as soon as it encounters a referenced object  as little as one RTT for all the referenced objects May 14, 2015 IIT, University of Dhaka 17
  • 18. Persistent Connection and Pipelining May 14, 2015 IIT, University of Dhaka 18
  • 19. HTTP request message  two types of HTTP messages: request, response  HTTP request message:  ASCII (human-readable format) GET /somedir/page.html HTTP/1.1 Host: www.someschool.edu User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header linesCarriage return, line feed indicates end of message May 14, 2015 IIT, University of Dhaka 19
  • 20. HTTP request message Con… May 14, 2015 IIT, University of Dhaka 20
  • 21. HTTP request message: general format May 14, 2015 IIT, University of Dhaka 21
  • 22. Uploading form input Post method:  Web page often includes form input  Input is uploaded to server in entity body URL method:  Uses GET method  Input is uploaded in URL field of request line: www.somesite.com/animalsearch?monkeys&banana May 14, 2015 IIT, University of Dhaka 22
  • 23. Method types HTTP/1.0  GET  POST  HEAD  asks server to leave requested object out of response HTTP/1.1  GET, POST, HEAD  PUT  uploads file in entity body to path specified in URL field  DELETE  deletes file specified in the URL field May 14, 2015 IIT, University of Dhaka 23
  • 24. HTTP response message HTTP/1.1 200 OK Connection close Date: Thu, 06 Aug 1998 12:00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data ... status line (protocol status code status phrase) header lines data, e.g., requested HTML file May 14, 2015 IIT, University of Dhaka 24
  • 25. HTTP response message con.. May 14, 2015 IIT, University of Dhaka 25
  • 26. HTTP response status codes 200 OK  request succeeded, requested object later in this message 301 Moved Permanently  requested object moved, new location specified later in this message (Location:) 400 Bad Request  request message not understood by server 404 Not Found  requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes: May 14, 2015 IIT, University of Dhaka 26
  • 27. Trying out HTTP (client side) for yourself 1. Telnet to your favorite Web server: Opens TCP connection to port 80 (default HTTP server port) at cis.poly.edu. Anything typed in sent to port 80 at cis.poly.edu telnet cis.poly.edu 80 2. Type in a GET HTTP request: GET /~ross/ HTTP/1.1 Host: cis.poly.edu By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to HTTP server 3. Look at response message sent by HTTP server! May 14, 2015 IIT, University of Dhaka 27
  • 28. User-server state: cookies Many major Web sites use cookies Four components: 1) cookie header line of HTTP response message 2) cookie header line in HTTP request message 3) cookie file kept on user’s host, managed by user’s browser 4) back-end database at Web site May 14, 2015 IIT, University of Dhaka 28
  • 29. User-server state: cookies Example:  Susan access Internet always from same PC  She visits a specific e-commerce site for first time  When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for ID May 14, 2015 IIT, University of Dhaka 29
  • 30. Cookies: keeping “state” May 14, 2015 IIT, University of Dhaka 30
  • 31. Web Cookies What cookies can bring:  authorization  shopping carts  recommendations  user session state (Web e- mail) Cookies and privacy:  cookies permit sites to learn a lot about you  you may supply name and e-mail to sites aside How to keep “state”:  Protocol endpoints: maintain state at sender/receiver over multiple transactions  cookies: http messages carry stateMay 14, 2015 IIT, University of Dhaka 31
  • 32. Web caches (proxy server)  user sets browser: Web accesses via cache  browser sends all HTTP requests to cache  object in cache: cache returns object  else cache requests object from origin server, then returns object to client Goal: satisfy client request without involving origin server client Proxy server client origin server origin server May 14, 2015 IIT, University of Dhaka 32
  • 33. More about Web caching  Cache acts as both client and server  Typically cache is installed by ISP (university, company, residential ISP) Why Web caching?  Reduce response time for client request.  Reduce traffic on an institution’s access link.  Internet dense with caches: enables “poor” content providers to effectively deliver content (but so does P2P file sharing) May 14, 2015 IIT, University of Dhaka 33