This document discusses the Hypertext Transfer Protocol (HTTP) and how it enables communication on the World Wide Web. It begins by explaining some key concepts like URLs, web pages, and objects. It then describes how HTTP uses a client-server model where clients like web browsers make requests to servers, which respond with requested objects. The document outlines both non-persistent and persistent HTTP, how they establish TCP connections, and how persistent HTTP can improve performance. It also examines HTTP request and response messages, status codes, and how cookies can be used to maintain state across client-server interactions.
HTTP is an application-level protocol for distributed, collaborative hypermedia systems that has been used by the World Wide Web since 1990. The initial HTTP/0.9 version provided a simple protocol for raw data transfer, while HTTP/1.0 introduced MIME-like messages to include meta information and request/response modifiers. HTTP/1.0 did not sufficiently account for hierarchical proxies, caching, persistent connections or virtual hosts. HTTP sits at the top of the TCP/IP stack and uses ports to carry protocols between services, with HTTP typically using port 80. An HTTP message is delivered over a TCP/IP connection by chopping the message into chunks small enough to fit in TCP segments, which are then sent inside IP datagrams
HTTP is a request-response protocol for transferring data over the internet. It was introduced by Tim Berners-Lee at CERN. The client submits an HTTP request to the server, which responds with status information and requested content. HTTP uses TCP for network connectivity and relies on DNS to connect clients to servers. HTTP 1.0 defined GET, POST, and HEAD methods, while HTTP 1.1 added PUT, DELETE, TRACE, OPTIONS, and CONNECT. Persistent connections allow multiple requests/responses over a single TCP connection, improving efficiency versus non-persistent connections requiring separate TCP for each transaction.
HTTP requests and responses follow a generic message format that includes a start line, message headers, an optional message body, and optional trailers. The start line indicates the request method and URI for requests or the HTTP version and status code for responses. Headers provide additional metadata about the message, sender, recipient, or content. The body carries request data or response content. Trailers are rarely used and provide additional headers after chunked content.
HTTP is the protocol that powers the web. It uses a request-response model where clients make requests that servers respond to. Common request methods include GET, POST, HEAD, PUT, DELETE, and OPTIONS. Responses include status codes like 200 for OK and content types. HTTP 1.1 added features like persistent connections and chunked encoding. Cookies are used to maintain statelessness. HTTPS uses SSL/TLS to secure HTTP connections with encryption, server authentication, and integrity.
HTTP is a client-server protocol for transmitting hypermedia documents across the internet. It uses a request-response paradigm where clients make requests which are answered by HTTP servers. Requests use methods like GET and POST, and include headers. Responses contain status lines, headers, and content. HTTP allows caching, cookies, authentication, and redirects. It is the foundation of data communication for the World Wide Web via the hypertext transfer protocol.
This document summarizes a lecture on computer networks and the hypertext transfer protocol (HTTP). It first reviews the early history of computer networking and the development of the world wide web. It then provides details on HTTP, including requests and responses, methods, status codes, and cookies. It discusses how caching works to improve performance by satisfying requests locally when possible. Methods like If-Modified-Since are described which check if a cached object has been updated before retrieving from the origin server.
HTTP is the Hypertext Transfer Protocol used globally for communication on the World Wide Web. It was first proposed in 1989 and has undergone several revisions with HTTP/1.1 being the most widely used version today. HTTP uses packets to transfer hypertext requests and responses between clients and servers, with the request containing a method like GET or POST and a URL, and the response containing a status code and optional headers and content.
HTTP is a protocol for transmitting hypermedia documents across the internet. It uses a client-server model where a web browser makes HTTP requests to a web server. The server then responds with the requested resources.
HTTP uses TCP/IP and the default port is 80. Requests have a method line specifying the request method (GET, POST, etc.), URL, and HTTP version. Responses have a status line with the HTTP version, status code, and reason phrase. Both include optional header lines and message body. Common methods are GET to retrieve a resource and POST to submit data to a server. Status codes indicate if a request was successful or encountered an error.
HTTP is the application-layer protocol for transmitting hypertext documents across the internet. It works by establishing a TCP connection between an HTTP client, like a web browser, and an HTTP server. The client sends a request to the server using methods like GET or POST. The server responds with a status code and the requested resource. HTTP is stateless, meaning each request is independent and servers do not remember past client interactions. Cookies and caching are techniques used to maintain some state and improve performance.
This document provides an overview of the Simple Mail Transfer Protocol (SMTP). It discusses how SMTP clients and servers work, how messages are sent to SMTP servers using either relaying or DNS, the SMTP communication model involving connection establishment, message transfer, and connection termination. It also describes mail processing involving envelopes and headers, status codes, and special features like mail forwarding, gatewaying, and relaying. Limitations of SMTP are also noted.
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
This document discusses the Transmission Control Protocol (TCP) which provides reliable, connection-oriented data transmission over the internet. TCP establishes a virtual connection between endpoints, ensuring reliable delivery through mechanisms like positive acknowledgement and retransmission. It uses a sliding window algorithm to guarantee reliable and in-order delivery while enforcing flow control between sender and receiver. Key aspects of TCP include connection establishment and termination, port numbers, segments, headers, and addressing end-to-end issues over heterogeneous networks.
HTTP is the protocol used to deliver web pages over the internet. It uses a request/response model where clients make HTTP requests to servers, which respond with HTTP responses. Common HTTP request methods include GET, POST, PUT, DELETE, and HEAD. A request contains an initial line specifying the method, URL, and protocol version. A response contains a status line with the protocol version, status code, and description. Common status codes include 2xx for success, 3xx for redirects, 4xx for client errors, and 5xx for server errors.
The document discusses the Internet Control Message Protocol (ICMP). ICMP provides error reporting, congestion reporting, and first-hop router redirection. It uses IP to carry its data end-to-end and is considered an integral part of IP. ICMP messages are encapsulated in IP datagrams and are used to report errors in IP datagrams, though some errors may still result in datagrams being dropped without a report. ICMP defines various message types including error messages like destination unreachable and informational messages like echo request and reply.
The document discusses the File Transfer Protocol (FTP). FTP uses two channels - a control channel over port 21 to send commands and a data channel over port 20 to transfer files. It describes common FTP commands to connect, navigate directories, set transfer properties, transfer files, and end sessions. The document also covers FTP status codes, transport bindings using active/passive modes, proxy transfers, and security issues like cleartext data transfers that FTP has addressed with TLS encryption.
This document provides an overview of internet protocols for email (SMTP) including:
- SMTP is used to transfer email between servers and works in a client-server model. Email clients use POP3 or IMAP to retrieve messages from servers.
- Key components include user agents (email clients), message transfer agents (MTA servers), and protocols like SMTP, POP3, and IMAP.
- SMTP uses a stored-and-forward method to route emails through intermediate servers within a network on its way to the destination address.
TCP and UDP are transport layer protocols that package and deliver data between applications. TCP provides reliable, ordered delivery through connection establishment and packet sequencing. UDP provides faster, unreliable datagram delivery without connections. Common applications using TCP include HTTP, FTP, and SMTP. Common UDP applications include DNS, DHCP, and streaming media.
- TCP and IP are core protocols of the Internet Protocol Suite, with TCP operating at the transport layer and providing reliable data transmission, and IP operating at the internet layer and routing packets between hosts.
- TCP establishes a virtual connection between hosts and provides services like flow control, error checking, and reliable ordered delivery. It uses port numbers to identify applications.
- Common applications that use TCP include Telnet, FTP, and TFTP, with Telnet using port 23, FTP using ports 20 and 21, and TFTP using port 69.
Group Communication (Distributed computing)Sri Prasanna
This document discusses different modes of communication in distributed systems including unicast, anycast, multicast, and broadcast. It then covers topics related to implementing group communication such as hardware vs software approaches, reliability, ordering of messages, and protocols like IP multicast and IGMP.
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...rahul kundu
The document defines HTTP and HTTPS. HTTP is the Hypertext Transfer Protocol that provides communication between web browsers and servers. It is unsecured and transmits data in plain text. HTTPS is HTTP secured with SSL/TLS encryption to provide security. Key differences are that HTTPS uses port 443 instead of HTTP's port 80, establishes an encrypted channel, and verifies servers with certificates to protect against attacks.
This document provides an overview of the application layer in computer networking. It discusses key concepts like the client-server and peer-to-peer paradigms for application communication. Popular application layer protocols are examined, including HTTP, FTP, SMTP, POP3, IMAP, and DNS. The document also covers programming network applications using sockets and building a web server.
The document discusses HTTP and how it facilitates data transfer on the World Wide Web. It describes how HTTP client-server interactions involve exchanging HTTP request and response messages to transfer web page objects like HTML files and images. It explains the process of transferring a web page that consists of multiple objects using non-persistent and persistent TCP connections. It also provides examples of HTTP request and response message formats.
Web services allow programs to call methods on other computers over a network. They are frequently web APIs that can be accessed remotely and executed on another system. Web services consist of method information describing the method being called and scoping information describing required arguments. This information is packaged and sent across the network using various protocols like HTTP, SOAP, and XML-RPC. The internet protocol stack, consisting of layers like application, transport, network and link, is used to break information into packets that can travel over the network to their destination and be reassembled.
Web services allow programs to communicate over a network by calling methods on remote systems. They are frequently web APIs that can be accessed over a network like the internet. A web service call packages method and scoping information into an envelope that is transported across the network using defined protocols like HTTP and TCP. At the destination, the same protocols unpack the envelope and call the requested method. Web servers store web pages and dynamic content, and respond to client requests over the internet using HTTP to deliver HTML files and other objects.
This lecture covered CIDR (Classless Inter-Domain Routing) and subnetting IP addresses. It discussed client-server and peer-to-peer networking models. Common network applications like email, web, and file sharing were mentioned. TCP and UDP transport protocols were summarized. HTTP protocol for web was explained in detail including persistent and non-persistent connections.
The document discusses various Internet application layer protocols including HTTP, DNS, and email. It provides details on how HTTP works, including the client-server model, HTTP request and response message formats, status codes, and caching. It also describes how DNS is used to map between hostnames and IP addresses through a hierarchy of root, local, and authoritative name servers.
HTTP is a request-response protocol used to transfer web pages over the internet. It uses a client-server model where browsers make requests to web servers, which respond with web pages. Requests use methods like GET and POST, while responses use status codes like 200 and 404. HTTP connections can be persistent, allowing multiple requests over the same connection. Cookies and caching help maintain state and improve performance. Content distribution networks further improve scalability using cached copies distributed geographically.
HTTP is a protocol for transmitting hypermedia documents across the internet. It uses a client-server model where browsers make HTTP requests to web servers, which respond with HTTP responses. Key aspects of HTTP include using TCP/IP for communication, being stateless, supporting a variety of data types, and incorporating features of both FTP and SMTP protocols.
Web Server Python Assignment You will develop a web server that ha.pdfamirajsharma
Web Server Python Assignment
You will develop a web server that handles one HTTP request at a time. Your web server should
accept and parse the HTTP request, get the requested file from the servers file system, create an
HTTP response message consisting of the requested file, and then send the response directly to
the client. If the requested file is not present in the server, the server should send an HTTP 404
Not Found message back to the client.
HTML File
Create an HTML file and store this in the same directory as your server program. You can create
any HTML file you would like for this assignment, but it should at a minimum contain a body of
text.
Server code
Create the server socket (using TCP) and bind it to the IP address of the server and port
number.
Establish a listening socket to listen for incoming connections from a client.
Establish a separate connection socket for the client-server.
The server should then receive a request from the client. This message is the file name of
the HTML file that the client is requesting. The HTML file needs to be stored in the same
directory as the server script.
The server will need to extract the requested object from the message and open the file to
then read the contents of the requested file.
The server then sends an HTTP response (the status code) if the file is found and then
returns the contents of the file to the client.
The connection socket is then closed since we are only servicing one request per
connection.
The server should send the appropriate status code to the client if the file is not found and
close the connection socket.
* There is nothing in the code shutting down the server program if the connection is successful,
so make sure to kill the process manually when not working on the program. *
Client Code
Write your own HTTP client to test your server.
Your client will connect to the server using a TCP connection. You will need to accept
the IP address of the server and port number as input from the user.
Send a request to the server. This is a message containing the file path of the file the
client wants to retrieve. The file path is obtained as input from the user.
Display the server response and contents of the file as output. The client should be able to
receive all the bytes of data sent from the server regardless of the number of bytes of your
specific HTML file.
Close the connection.
This document provides an overview of the application layer in computer networking. It discusses key concepts like client-server and peer-to-peer architectures, sockets, addressing processes, and application layer protocols. Specific protocols covered include HTTP, FTP, email (SMTP, POP3, IMAP), DNS, and DHCP.
This document provides an overview of distributed web-based systems, including the key components and technologies that enable them. It discusses the World Wide Web and how documents are accessed via URLs. It also describes HTTP and how connections and requests/responses work. Other topics covered include caching, content distribution networks, web services, traditional and multi-tiered web architectures, web server clusters, and web security protocols like SSL.
The document provides an overview of PHP and its capabilities compared to other web technologies. It discusses how PHP allows for dynamic content and user interactivity on websites, unlike static HTML. It also summarizes HTTP and the client-server model, and how PHP integrates as a common gateway interface (CGI) to enable server-side scripting. Key topics covered include the history of HTML/XHTML, HTTP request/response formats, and how PHP addresses limitations of static websites by running on the server-side.
Write in Python please Web Server Python Assignment You will dev.pdfalbert20021
Write in Python please
Web Server Python Assignment
You will develop a web server that handles one HTTP request at a time. Your web server should
accept and parse the HTTP request, get the requested file from the servers file system, create an
HTTP response message consisting of the requested file, and then send the response directly to
the client. If the requested file is not present in the server, the server should send an HTTP 404
Not Found message back to the client.
HTML File
Create an HTML file and store this in the same directory as your server program. You can create
any HTML file you would like for this assignment, but it should at a minimum contain a body of
text.
Server code
Create the server socket (using TCP) and bind it to the IP address of the server and port
number.
Establish a listening socket to listen for incoming connections from a client.
Establish a separate connection socket for the client-server.
The server should then receive a request from the client. This message is the file name of
the HTML file that the client is requesting. The HTML file needs to be stored in the same
directory as the server script.
The server will need to extract the requested object from the message and open the file to
then read the contents of the requested file.
The server then sends an HTTP response (the status code) if the file is found and then
returns the contents of the file to the client.
The connection socket is then closed since we are only servicing one request per
connection.
The server should send the appropriate status code to the client if the file is not found and
close the connection socket.
* There is nothing in the code shutting down the server program if the connection is successful,
so make sure to kill the process manually when not working on the program. *
Client Code
Write your own HTTP client to test your server.
Your client will connect to the server using a TCP connection. You will need to accept
the IP address of the server and port number as input from the user.
Send a request to the server. This is a message containing the file path of the file the
client wants to retrieve. The file path is obtained as input from the user.
Display the server response and contents of the file as output. The client should be able to
receive all the bytes of data sent from the server regardless of the number of bytes of your
specific HTML file.
Close the connection.
What to turn in:
ReadMe
Server code
Client code
HTML file that you used to test your program.
The document discusses how the Hypertext Transfer Protocol (HTTP) works to access resources over the web. HTTP uses a request-response mechanism where a client like a web browser sends a request to a server using a method like GET or POST. The server then responds with the requested resource or an error message. HTTP defines the format for requests, which include the request line and header lines, and responses, which include the status line and header lines. Improvements in HTTP/1.1 include persistent connections and request pipelining. Cookies are used to maintain state across multiple requests. HTTPS provides encryption to secure HTTP communications.
The HTTP protocol uses TCP/IP to send HTML documents in packets over the Internet. Each packet contains a header with information about the requested page, servers, and clients. HTTP version 1.0 is the current standard and uses MIME for encoding data. A basic HTTP request involves a client establishing a connection, making a request, receiving a response from the server, and closing the connection. Common HTTP methods include GET to retrieve a page, HEAD to get metadata without content, and POST to submit data to a server.
URI refers to Uniform Resource Identifiers, which include URLs and URNs used to identify resources on the web. URLs contain the protocol, host, path, and name to locate a resource using its network location. URIs are encoded to represent unsafe characters like spaces using percent encoding. Web browsers make HTTP requests to web servers, which respond by sending the requested pages back to the browser over the TCP protocol in a stateless manner according to the HTTP specification. HTML forms allow collecting user input on web pages for submission to servers via the GET or POST methods.
The document discusses frameworks in web development and provides examples using ASP.NET MVC framework. It defines what a framework is, explains the benefits of using frameworks like organizing code and faster development. It also describes the MVC pattern with model, view and controller components. An example application is built using ASP.NET MVC and Entity Framework to demonstrate how to create, build and run an MVC application.
This document discusses different 3D display and rendering methods. It describes parallel and perspective projections, which transform 3D objects onto a 2D plane. Parallel projection discards the z-coordinate and keeps parallel lines parallel, while perspective projection converges lines to give a realistic impression of depth. Common projection types include orthographic, oblique, cavalier and cabinet. Surface rendering involves collecting data on an object to create a 3D computer image, and is used in industries like healthcare and archaeology.
Diagnosis of lung cancer predictionsystem using data mining Classification T...Toushik Paul
This presentation discusses developing a lung cancer prediction system using data mining classification techniques. It begins with an introduction to lung cancer types, symptoms, and risk factors. It then discusses using knowledge discovery and data mining to extract patterns from medical data. Several data mining classification methods are examined, including decision trees, neural networks, and Bayesian networks. The presentation concludes that a naive Bayes model most effectively predicts lung cancer, but decision trees are easier to interpret and provide patient profile details.
This document describes a project to build a gas and smoke detector using an Arduino, smoke sensor, buzzer, and SIM900A GSM module. The detector will sense for gas or smoke using the MQ-2 smoke sensor, and if detected above a threshold it will activate the buzzer and send an SMS alert via the SIM900A module to notify authorities. The detector is intended to help reduce losses and accidents from gas or smoke by providing early warning. It lists and describes the components used, including how they are connected and setup to work together.
Gas and smoke use every day of our life. A big number of accident happen today everyday life from the gas. A huge number of loss occur from gas and smoke in our everyday life. Gas speared so quickly that an accident happen so quickly.
So basically we try to modify our project to make a gas or smoke detector that will response with the present of smoke and send warning sms.
A brief introduction to quadcopter (drone) working. It provides an overview of flight stability, dynamics, general control system block diagram, and the electronic hardware.
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionBert Blevins
Cybersecurity breaches are a growing threat in today’s interconnected digital landscape, affecting individuals, businesses, and governments alike. These breaches compromise sensitive information and erode trust in online services and systems. Understanding the causes, consequences, and prevention strategies of cybersecurity breaches is crucial to protect against these pervasive risks.
Cybersecurity breaches refer to unauthorized access, manipulation, or destruction of digital information or systems. They can occur through various means such as malware, phishing attacks, insider threats, and vulnerabilities in software or hardware. Once a breach happens, cybercriminals can exploit the compromised data for financial gain, espionage, or sabotage. Causes of breaches include software and hardware vulnerabilities, phishing attacks, insider threats, weak passwords, and a lack of security awareness.
The consequences of cybersecurity breaches are severe. Financial loss is a significant impact, as organizations face theft of funds, legal fees, and repair costs. Breaches also damage reputations, leading to a loss of trust among customers, partners, and stakeholders. Regulatory penalties are another consequence, with hefty fines imposed for non-compliance with data protection regulations. Intellectual property theft undermines innovation and competitiveness, while disruptions of critical services like healthcare and utilities impact public safety and well-being.
Exploring Deep Learning Models for Image Recognition: A Comparative Reviewsipij
Image recognition, which comes under Artificial Intelligence (AI) is a critical aspect of computer vision,
enabling computers or other computing devices to identify and categorize objects within images. Among
numerous fields of life, food processing is an important area, in which image processing plays a vital role,
both for producers and consumers. This study focuses on the binary classification of strawberries, where
images are sorted into one of two categories. We Utilized a dataset of strawberry images for this study; we
aim to determine the effectiveness of different models in identifying whether an image contains
strawberries. This research has practical applications in fields such as agriculture and quality control. We
compared various popular deep learning models, including MobileNetV2, Convolutional Neural Networks
(CNN), and DenseNet121, for binary classification of strawberry images. The accuracy achieved by
MobileNetV2 is 96.7%, CNN is 99.8%, and DenseNet121 is 93.6%. Through rigorous testing and analysis,
our results demonstrate that CNN outperforms the other models in this task. In the future, the deep
learning models can be evaluated on a richer and larger number of images (datasets) for better/improved
results.
Development of Chatbot Using AI/ML Technologiesmaisnampibarel
The rapid advancements in artificial intelligence and natural language processing have significantly transformed human-computer interactions. This thesis presents the design, development, and evaluation of an intelligent chatbot capable of engaging in natural and meaningful conversations with users. The chatbot leverages state-of-the-art deep learning techniques, including transformer-based architectures, to understand and generate human-like responses.
Key contributions of this research include the implementation of a context- aware conversational model that can maintain coherent dialogue over extended interactions. The chatbot's performance is evaluated through both automated metrics and user studies, demonstrating its effectiveness in various applications such as customer service, mental health support, and educational assistance. Additionally, ethical considerations and potential biases in chatbot responses are examined to ensure the responsible deployment of this technology.
The findings of this thesis highlight the potential of intelligent chatbots to enhance user experience and provide valuable insights for future developments in conversational AI.
How to Manage Internal Notes in Odoo 17 POSCeline George
In this slide, we'll explore how to leverage internal notes within Odoo 17 POS to enhance communication and streamline operations. Internal notes provide a platform for staff to exchange crucial information regarding orders, customers, or specific tasks, all while remaining invisible to the customer. This fosters improved collaboration and ensures everyone on the team is on the same page.
20CDE09- INFORMATION DESIGN
UNIT I INCEPTION OF INFORMATION DESIGN
Introduction and Definition
History of Information Design
Need of Information Design
Types of Information Design
Identifying audience
Defining the audience and their needs
Inclusivity and Visual impairment
Case study.
4. HTML tells the browser how to present the
content to the user.
5. Web and HyperText Transfer Protocol (HTTP)
First some jargon
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
7. HTTP overview
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
8. Ports
The TCP port numbers
from 0 to 1023 are reserved
for well-known services.
Don’t use these ports for
your own custom server
programs!
9. HTTP overview (continued)
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)
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
aside
10. HTTP connections
Nonpersistent HTTP
At most one object is
sent over a TCP
connection.
HTTP/1.0 uses
nonpersistent HTTP
Persistent HTTP
Multiple objects can be
sent over single TCP
connection between
client and server.
HTTP/1.1 uses
persistent connections in
default mode
11. Nonpersistent 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)
12. Nonpersistent HTTP (cont.)
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.
time
13. Response time modeling
Definition of RRT: time to
send a small packet to
travel from client to server
and back.
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
time to
transmit
file
initiate TCP
connection
RTT
request
file
RTT
file
received
time time
14. Persistent HTTP
Nonpersistent HTTP issues:
requires 2 RTTs per object
OS must work and allocate
host resources for each TCP
connection
but browsers often open
parallel TCP connections to
fetch referenced objects
Persistent HTTP
server leaves connection
open after sending response
subsequent HTTP messages
between same client/server
are sent over connection
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
15. 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
lines
Carriage return,
line feed
indicates end
of message
21. HTTP request message: general 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)
22. HTTP request message: general format
Now let's look at the header lines in the example. The header line HOST: www.someschool.edu specifies the host on which the
object resides. You night think that this header line is unnecessary, as there is already a TCP connection in place to the host. But,
as we'll see in Section 2.2.6, the information provided by the host header line is required by Web proxy caches. By including
theConnection:close header line, the browser is telling the server that it doesn't want to use persistent connections; it wants the
server to close the connection after sending the requested object. Thus the browser that generated this request message
implements HTTP/1.1 but it doesn't want to bother with persistent connections. The User-agent: header line specifies the user
agent, that is, the browser type that is making the request to the server . Here the user agent is Mozilla/4.0, a Netscape browser.
This header line is useful because the server can actually send different versions of the same object to different types of user
agents. (Each of the versions is addressed by the same URL.) Finally, the Accept-language: header indicates that the user prefers
to receive a French version of the object, if such an object exists on the server; otherwise, the server should send its default
version.
The Entity Body is not used with the GET method, but is used with the POST method. The HTTP client uses the POST method
when the user fills out a form
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
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
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:
26. User-Server Interaction: Authorization and
Cookies
HTTP server is stateless – simplifies server design
Sometime server needs to identify user
Two mechanism for identification:
1. Authorization & 2. CooKies
Authorization :
1) Provide username and password to access documents on server
2) Status code 401: Authorization Required
27. User-server state: cookies
Many major Web sites use
cookies
Four components:
1) cookie header line in the
HTTP response message
2) cookie header line in
HTTP request message
3) cookie file kept on user’s
host and managed by
user’s browser
4) back-end database at Web
site
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
28. Cookies: keeping “state” (cont.)
client server
usual http request msg
usual http response +
Set-cookie: 1678
usual http request msg
cookie: 1678
usual http response msg
usual http request msg
cookie: 1678
usual http response msg
cookie-
specific
action
cookie-
spectific
action
server
creates ID
1678 for user
Cookie file
amazon: 1678
ebay: 8734
Cookie file
ebay: 8734
Cookie file
amazon: 1678
ebay: 8734
one week later:
29. Cookies (continued)
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
search engines use redirection & cookies to
learn yet more
advertising companies obtain info across sites
aside