- /* Guess correct Content-Type based on the filename's ending */
- if (filename)
- {
- const char *content_type = get_content_type(filename);
- log_error(LOG_LEVEL_CGI,
- "Content-Type guessed for %s: %s", filename, content_type);
- err = enlist_unique_header(rsp->headers, "Content-Type", content_type);
- }
- else
- {
- /* XXX: why should this happen */
- }
+ content_type = get_content_type(filename);
+ log_error(LOG_LEVEL_CGI,
+ "Content-Type guessed for %s: %s", filename, content_type);
+
+ return enlist_unique_header(rsp->headers, "Content-Type", content_type);