Docsity

Understanding URLs and HTTP in Electronic Commerce, Slides of Fundamentals of E-Commerce

Partial preview of the text

Download Understanding URLs and HTTP in Electronic Commerce and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Electronic Commerce (WS-02/03) 3-

3. Enabling Web and Software Technologies

3.1 Client / Server Architectures and the Internet 3.2 Internet Protocols and Internet Infrastructure HTTP, Security for HTTP, Web Servers 3.3 Multi-Tier Architectures 3.4 Platform Choices and Connectivity Options

Electronic Commerce (WS-02/03) 3-

Web Technologies (1)

HTTP: Hypertext Transfer Protocol. Purpose: Accessing resources on the internet (web documents). Clients (browsers) issue requests for resources to a server, the server sends the requested document back to the client as a response. Current version is HTTP/1.1. Purpose Purpose Purpose

**1. Infrastructure

  1. Target Identification** 3. Service Messaging Proxies, Gateways, Tunnels, Mirrors, Firewalls: Important additional client- and server-side resources on the web used to enhance performance, availability, accessibility and to protect servers, etc. URL: Uniform Resource Locator. Defines the location of a resource on the internet. Example: http://www.sts.tu-harburg.de/teaching/ is a URL. Requests, Responses, Headers, Extensions, Negotiation, etc. regulate the format of messages which communicate service details HTTP Requirements:

Electronic Commerce (WS-02/03) 3-

Uniform Resource Locator (URL) (2)

Example Protocol Host Path In the example the port is omitted; it can be deduced from the protocol.

http :// www.sts.tu-harburg.de /teaching/entry.html

Transmission Control Protocol (TCP) Application Layer Network Layer Internet Protocol (IP) Internet Layer Internet Protocols Network^ ATM^ Ethernet^ others Application Protocols HTTP FTP others Resource Addressing^ URLs address most (all) protocols

Electronic Commerce (WS-02/03) 3-

URL Extensions

These extensions are commonly used, but are not part of a URL by definition: o Fragment A fragment indicates that after the specified resource is retrieved, the application is specifically interested in a part of the resource that is marked-up (tagged) by the fragment‘s name. The meaning of a fragment is resource-specific. Example: http://www.sts.tu-harburg.de/teaching/entry.html #top o Parameters Parameters are used to transmit – a limited amount (max. 4 KBytes) of - information from the client to the server. Example: http://www.register.com ?firstname=patrick&lastname=hupe

Electronic Commerce (WS-02/03) 3-

HTTP Messages

HTTP requests and response follow the HTTP message format. Generic HTTP message format: generic-message ::= start-line ( message-header )* <CR/LF> ( message-body )? start-line ::= request-line | status-line message-header ::= general-header | entity-header | request-header | response-header o Entity-headers contain meta-information describing the entity (content). o Request-headers may only appear in requests. o Response-headers may only appear in responses. For examples of HTTP Messages (GET and POST requests) see slides 3.51 and 3.53, 3.54. Notation: * = repetition (0..n)? = option (0 or 1) | = choice (a or b)

Electronic Commerce (WS-02/03) 3-

HTTP Request

request ::= request-line ( general-header | entity-header | request-header )* <CR/LF> ( message-body )? request-line ::= request-method URI http-version <CR/LF> HTTP request methods: o GET: Used by client to send a retrieve request for a document on a server. o HEAD: Used by client to retrieve only the headers (meta-information), but not the document itself. As the headers contain an entry on the document‘s length, this method is useful for quality-based transfer decisions. o POST: Used by client to send information to the server (usually information provided in a form). An alternative for sending information from client to server is using the GET method with URL rewriting. Note: TRACE, PUT, DELETE, and OPTIONS are not commonly used in ECommerce applications and are therefore skipped. Further reading [Wilde99].

Electronic Commerce (WS-02/03) 3-

GET Request: Protocol View

GET / HTTP/1.

Connection: Keep-Alive User-Agent: Mozilla/4.7 [de] (WinNT; I) Host: localhost: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, / Accept-Encoding: gzip Accept-Language: de Accept-Charset: iso-8859-1,*,utf- Transferred request information Request Line Headers (see slide 3.50) simplest URL-case: /