anchor.diff:  -export([send/1, recv/1, recv/2, recv_body/0, recv_body/1]).
   -export([start_response/1, start_response_length/1, start_raw_response/1]).
   -export([respond/1, ok/1]).
  --export([not_found/0]).
  +-export([not_found/0, not_found/1]).
   -export([parse_post/0, parse_qs/0]).
   -export([should_close/0, cleanup/0]).
   -export([parse_cookie/0, get_cookie_value/1]).
  --export([serve_file/2]).
  +-export([serve_file/2, serve_file/3]).
   -export([test/0]).
   
   -define(SAVE_QS, mochiweb_request_qs).
  
positive.code:     Response.
  
  %% @spec not_found() -> response()
  %% @doc respond({404, [{"Content-Type", "text/plain"}], "Not found."}).
  not_found() ->
      respond({404, [{"Content-Type", "text/plain"}], <<"Not found.">>}).
  
  %% @spec ok({value(), iodata()} | {value(), ioheaders(), iodata() | {file, IoDevice}}) ->
  %%           response()
  
negative.code:                     LastModified = httpd_util:rfc1123_date(FileInfo#file_info.mtime),
                      case get_header_value("if-modified-since") of
                          LastModified ->
                              respond({304, ExtraHeaders, ""});
                          _ ->
                              case file:open(File, [raw, binary]) of
                                  {ok, IoDevice} ->
                                      ContentType = mochiweb_util:guess_mime(File),
                                      Res = ok({ContentType,
                                                [{"last-modified", LastModified}
                                                 | ExtraHeaders],
                                                {file, IoDevice}}),
                                      file:close(IoDevice),
                                      Res;
                                  _ ->
                                      not_found(ExtraHeaders)
                              end
                      end;
                  {error, _} ->
                      not_found(ExtraHeaders)
              end
      end.
  
  