Nwritten 0 and call write again else return 1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: list of MIME types is maintained at ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types 663 The HTTP/1.1 protocol is documented in RFC 2616. Homework Problems Homework Problem 12.9 [Category 2]: Modify the cpstdinbuf program in Figure 12.14 so that it uses readn and writen to copy standard input to standard output, MAXBUF bytes at a time. Homework Problem 12.10 [Category 2]: A. Modify T INY so that it echos every request line and request header. B. Use your favorite browser to make a request to T INY for static content. Capture the output from T INY in a file. C. Inspect the output from T INY to determine the the version of HTTP your browser uses. D. Consult the HTTP/1.1 standard in RFC 2616 to determine the meaning of each header in the HTTP request from your browser. You can obtain RFC 2616 from www.rfc-editor.org/rfc.html. Homework Problem 12.11 [Category 2]: Extend T INY to so that it serves MPG video files. Check your work using a real browser. Homework Problem 12.12 [Category 2]: Modify T INY so that its reaps CGI children inside a SIGCHLD handler instead of explicitly waiting for them to terminate. Homework Problem 12.13 [Category 2]: Modify T INY so that when it serves static content, it copies the requested file to the connected descriptor using malloc, read, and write, instead of mmap and write. Homework Problem 12.14 [Category 2]: A. Write an HTML form for the CGI...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online