WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.

Slides:



Advertisements
Similar presentations
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Advertisements

1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
PART 6 Application Layer
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
IST 535 Week 1 Class Orientation / Review of Web Basics.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
How the web works: HTTP and CGI explained
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
HTTP Presented By: Holly Mortinson Amy Drout Kyle Balmer & Matt Conklin.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Definitions, Definitions, Definitions Lead to Understanding.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Hypertext Transport Protocol CS Dick Steflik.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
INTRODUCTION TO WEB DATABASE PROGRAMMING
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Network Applications Outline Simple Mail Transfer Protocol
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
FTP (File Transfer Protocol) & Telnet
Mail (smtp), VoIP (sip, rtp)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
ES Module 5 Uniform Resource Locators, Hypertext Transfer Protocol, & Common Gateway Interface.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
WebServer A Web server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol (HTTP), serves the files that.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
Chapter 29 World Wide Web & Browsing World Wide Web (WWW) is a distributed hypermedia (hypertext & graphics) on-line repository of information that users.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CS 6401 The World Wide Web Outline Background Structure Protocols.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Overview of Servlets and JSP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
INTRODUCTION Dr Mohd Soperi Mohd Zahid Semester /16.
HTTP Protocol Amanda Burrows. HTTP Protocol The HTTP protocol is used to send HTML documents through the Internet. The HTTP protocol sends the HTML documents.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP – An overview.
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Client side & Server side scripting
Configuring Internet-related services
PART 6 Application Layer
Presentation transcript:

WWW: an Internet application Bill Chu

© Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains a collection of documents a client can request a document from any info server one document can refer another document in any information server via a Hyper link HTTP is the application protocol that defines the WWW server-client interactions HTTP server maintains the HTTP documents HTTP client obtains and displays the HTTP docs

© Bei-Tseng Chu Aug 2000 The client and server architecture A client connects to a server to send and receive information A server typically a “large” computer that is capable of handling multiple client requests at the same time. The WWW is the universal client server architecture.

© Bei-Tseng Chu Aug 2000 Benefits of the Client Server architecture Effective model for information sharing Server makes information available for multiple clients Clients are sure to receive the most up to date information Server technology can be changed (e.g. a database change) without effecting clients Clients can be dispersed geographically Server maintenance is easier since if all clients are connecting to one place.

© Bei-Tseng Chu Aug 2000 Protocol A protocol is a series of steps, involving two or more parties, designed to accomplish a task Everyone involved in the protocol must know the protocol and all of the steps to follow in advance Everyone in the protocol must agree to follow it The protocol must be unambiguous; each step must be well defined and there must be no chance of a misunderstanding. The protocol must be complete; there must be a specified action for every possible situation.

© Bei-Tseng Chu Aug 2000 HyperText Transfer Protocol (HTTP) Address: IP address + TCP port 80 Format: HTTP request format Request request-URL HTTP-version 0 or more headers Body if it is a POST request HTTP reply format HTTP-version response-code response-phrase 0 or more headers body (HTTP document) Rules: client sends a HTTP request to server server sends back a HTTP reply

© Bei-Tseng Chu Aug 2000 Example Step one: wait for a new request The httpd program waits for a request to arrive from some client somewhere on the Internet. The server program listens on a port and is dormant at this state (default 80).

© Bei-Tseng Chu Aug 2000 Step two: A request arrives from a client A user might have typed in a URL at a browser: The browser will request a connection with the server at The browser issues GET /sample.html http/1.0 User-agent: Mosaic for X Windows/2.4 Accept: text/plain Accept: text/html Accept: images/*

© Bei-Tseng Chu Aug 2000 Step three: The server parses the request The server decodes the message according to http protocol and determines what it should do: Method: GET Document: /sample.html Protocol: http, Version 1.0 User agent: Mosaic for X Window/2.4 Accept: text/plain,text/html, image/*

© Bei-Tseng Chu Aug 2000 Step four: Do the method requested The httpd program fulfills the request. To GET a document, the server looks up the file (/sample.html) in its document tree Success: document sent HTTP/ Document follows Server: NCSAV1.4 Date: Thu, 20 Jul :00:00 GMT Content-type: text/html Content-length: 1066 Last-modified: Thu, 20 Jul :38:00 GMT Failure: an error is sent HTTP/ Not Found Server NCSA/1.4 Date: Thu, 20 Jul :00:00 GMT Content-type: text/html Content-length: 0

© Bei-Tseng Chu Aug 2000 Step five: Finish up: close file; close network connection When the file is completely sent or an error message is sent, the httpd server is finished with its work. It closes the file and closes the network connection. The client receives the data and formats it according to http tags. The server is now ready for more requests and it goes to step 1.

© Bei-Tseng Chu Aug 2000 Web scripts and CGI Web script is a program that can be executed by the web server in response to web requests. Any program can be a web script, there is no mandatory language Common Gateway Interface (CGI) is a standard for how scripts can be called (by httpd) and how data is passed between the httpd server and the script

© Bei-Tseng Chu Aug 2000 Example Step one: wait for a new request The httpd program waits for a request to arrive from some client somewhere on the Internet. The server program listens on a port and is dormant at this state.

© Bei-Tseng Chu Aug 2000 Step two: A request arrives from a client A user might have typed in a URL at a browser: The browser will request a connection with the server at The browser issues GET /scripts/how_busy_are_you http/1.0 User-agent: Mosaic for X Windows/2.4 Accept: text/plain Accept: text/html Accept: images/*

© Bei-Tseng Chu Aug 2000 Step three: Do the method requested The httpd program fulfills the request by executing the script. The server knows it is a script because it is a file under the direction “script”. The name of the “script” directory is set at web server configuration time. To GET the script, the server looks up the file (/scripts/how_busy_are_you) in its document tree Success: the output of the script (normally directed to the screen) is sent to browser HTTP/ Document follows Server: NCSAV1.4 Date: Thu, 20 Jul :00:00 GMT Content-type: text/plain 11:35am up 7 days, 4:35, 5 users, load average: 0.00, 0.09, 0.00 Failure: an error is sent HTTP/ Document follows Server: NCSAV1.4 Date: Thu, 20 Jul :00:00 GMT Content-type: text/plain Cannot find uptime command on this system

© Bei-Tseng Chu Aug 2000 Step four: Finish up: close file; close network connection When the file is completely sent or an error message is sent, the httpd server is finished with its work. It closes the file and closes the network connection. The client receives the data and formats it according to http tags. The server is now ready for more requests and it goes to step 1.

© Bei-Tseng Chu Aug 2000 Scripts and forms Form for CSO PH Query This form will send a PH query to the specified ph server PH server: Return name? Return phone? Return ? At least one of the following fields must be specified: Name

© Bei-Tseng Chu Aug 2000

Passing arguments to web scripts When the submit button is clicked the browser sends: GET Jserver=ns.anywhere.com&doname=yes&dophone=yes&Qname= http/1.0

© Bei-Tseng Chu Aug 2000 HTTP request methods GET: retrieve information from the server. It is the most commonly used. It can also be used in conjunction of CGI to pass parameters to the server HEAD: it is identical to GET, except that the server does not return a document. It is useful for verifying a document exists for checking links or time of modification POST: allows the server to receive data from the client. It is most commonly used to send the data in HTML forms to the server for processing.

© Bei-Tseng Chu Aug 2000 Security risks for CGI Consider a web-based form: message:

© Bei-Tseng Chu Aug 2000

Security problem Suppose the pearl script saves the message into a temp file and executes the unix command: sendmail A malicious user could type in the field for address: This turns into: sendmail