-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.39 2006/09/08 09:49:23 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.40 2006/09/09 13:05:33 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
*
* Revisions :
* $Log: cgisimple.c,v $
+ * Revision 1.40 2006/09/09 13:05:33 fabiankeil
+ * Modified cgi_send_user_manual to serve binary
+ * content without destroying it first. Should also be
+ * faster now. Added ".jpg" check for Content-Type guessing.
+ *
* Revision 1.39 2006/09/08 09:49:23 fabiankeil
* Deliver documents in the user-manual directory
* with "Content-Type text/css" if their filename
assert(rsp);
assert(parameters);
+ if (!parameters->first)
+ {
+ /* requested http://p.p/user-manual (without trailing slash) */
+ return cgi_redirect(rsp, CGI_PREFIX "user-manual/");
+ }
+
get_string_param(parameters, "file", &filename);
/* Check paramter for hack attempts */
if (filename && strchr(filename, '/'))