[cs631apue] [CS631] If-Modified-Since Header

Jan Schaumann jschauma at stevens.edu
Sun Nov 18 22:40:15 EST 2012


tparisi <tparisi at stevens.edu> wrote:

> I was wondering what should happen if the If-Modified-Since Header is  
> executed on a directory.  Should it go through the entire directory if  
> "index.html" is not present and find the pages that have been modified?  
> If so, how many should be served?

Take a look at what other web servers do.

For example, let's see what the web server handling the Stevens website
does.  On linux-lab.cs.stevens.edu:

$ mkdir -p ~/public_html/tmp
$ date +"%a, %d %b %Y %H:%m:%S %Z"
Sun, 18 Nov 2012 22:11:40 EST
$ telnet www.cs.stevens.edu 80
GET /~<yourusername>/tmp/ HTTP/1.1
Host: www.cs.stevens.edu
If-Modified-Since: Sun, 18 Nov 2012 22:11:40 EST


Create a file named index.html and another file in that directory and
play around with setting the mtime on the directory or the files, and
compare behaviour with or without the presence of the index.html file.

-Jan


More information about the cs631apue mailing list