You are on page 1of 4

CHAPTER 27

WWW and HTTP
Solutions to Review Questions and Exercises

Review Questions
1. HTTP is a file transfer protocol that facilitates access to the WWW. 2. HTTP is like SMTP because the data transferred between the client and server are similar in appearance to SMTP messages. Also, the format of the messages is controlled by MIME-like headers. 3. HTTP is like FTP because they both transfer files and use the services of TCP. 4. The URL is a standard that facilitates the access of documents on the Web. A URL defines a method, a host computer, a port, and a path. 5. A proxy server is a computer that keeps copies of responses to recent requests. When an HTTP client has a request, the cache of the proxy server is checked before the request goes to the regular server. 6. A browser consists of a controller, client program, and interpreters. 7. A Web document can be classified as either static, active, or dynamic. 8. Hypertext Markup Language (HTML) is a language for creating Web pages. 9. A dynamic document is the product of a program run by a server as requested by a browser. An active document is the product of a program sent from the server to the client and run at the client site. 10. The Common Gateway Interface (CGI) is a standard that creates and handles dynamic documents. 11. Java is one of the languages that is used to write an active document.

Exercises
12. The first picture will be centered and the second will be at the bottom. 13. On the screen you see: The publisher of this book is McGraw-Hill Publisher

1

2

14. GET /usr/users/doc/doc.1 HTTP /1.1 Date: Fri, 13-Jan-06 08:45:20 GMT MIME-version: 1.0 Accept: image/gif Accept: image/jpeg Last modified: Mon, 09-Jan-06 15. HTTP/1.1 200 OK Date: Fri, 13-Jan-06 08:45:25 GMT Server: Challenger MIME-version: 1.0 Content-length: 4623 (Body of document) 16. HTTP/1.1 302 Moved permanently Date: Fri, 13-Jan-06 08:45:25 GMT Server: Challenger Location: /usr/deads/doc.1 17. HTTP/1.1 400 Bad Request Date: Fri, 13-Jan-06 08:45:25 GMT Server: Challenger 18. HTTP/1.1 401 Unauthorized Date: Fri, 13-Jan-06 08:45:25 GMT Server: Challenger 19. HEAD /bin/users/file HTTP /1.1 Date: Fri, 13-Jan-06 10:40:22 GMT MIME-version: 1.0 From: mzzchen@sinonet.cn 20. HTTP/1.1 200 OK Date: Fri, 13-Jan-06 10:40:27 GMT Server: Challenger Content-type: image/jpeg Content-length: 4623

3

21. COPY /bin/usr/bin/file1 HTTP /1.1 Date: Fri, 13-Jan-06 10:52:12 GMT MIME-version: 1.0 Location: /bin/file1 22. HTTP/1.1 200 OK Date: Fri, 13-Jan-06 10:53:00 GMT Server: Challenger 23. DELETE /bin/file1 HTTP /1.1 Date: Fri, 13-Jan-06 11:04:22 GMT Server: Challenger Authentication: swd22899/3X4ake88rTfh (Not discussed in the book) 24. HTTP/1.1 200 OK Date: Fri, 13-Jan-06 11:11:02 GMT Server: Challenger 25. GET /bin/etc/file1 HTTP /1.1 Date: Fri, 13-Jan-06 11:22:08 GMT MIME-version: 1.0 Accept: */* If-modified-since: 23-Jan-1999 00:00:00 GMT 26. HTTP/1.1 200 OK Date: Fri, 13-Jan-06 11:24:06 GMT Server: Challenger MIME-version: 1.0 Content-length: 2686 (Body of document) 27. GET /bin/etc/file1 HTTP /1.1 Date: Fri, 13-Jan-06 11:41:02 GMT MIME-version: 1.0 Accept: */* Host: Mercury Authentication: swd22899/3X4ake88rTfh (Not discussed in the book) 28. HTTP/1.1 200 OK

4

Date: Fri, 13-Jan-06 11:45:06 GMT Server: Challenger MIME-version: 1.0 Content-type: text/html Content-length: 4156 (Body of document) 29. PUT /bin/letter HTTP /1.1 Date: Fri, 13-Jan-06 11:47:00 GMT MIME-version: 1.0 Accept: text/html Accept: image/gif Accept: image/jpeg Location: /bin/letter 30. HTTP/1.1 200 OK Date: Fri, 13-Jan-06 11:51:02 GMT Server: Challenger MIME-version: 1.0 Content-type: text/html Content-length: 6324 Age: 10:06:02 Expires: 09-May-06 00:00:00 GMT