[cs631apue] SWS File I/O error
jschauma at stevens.edu
Thu Dec 15 10:15:04 EST 2011
Rob Hoffmann <rhoffman at stevens.edu> wrote:
> The response header should be sent before writing the file to the
> socket, after the file has been located. However, if a failure happens
> during the reading/sending of the file, then the server should send a
> status 500...except the response header was already sent.
I think it's fine to generate the header when you know that you can read
the file (ie after opening it has succeeded). If things go bump after
that, so be it. Stuff happens.
More information about the cs631apue