mirror of
https://github.com/sheumann/hush.git
synced 2024-06-06 17:29:42 +00:00
fix debug message
Print the mime-type only after it has been set. Add possible TODOs: use TCP_CORK, parse_config()
This commit is contained in:
parent
acdc49c073
commit
62851171db
|
@ -32,7 +32,7 @@
|
||||||
* foo=`httpd -d $foo` # decode "Hello%20World" as "Hello World"
|
* foo=`httpd -d $foo` # decode "Hello%20World" as "Hello World"
|
||||||
* bar=`httpd -e "<Hello World>"` # encode as "<Hello World>"
|
* bar=`httpd -e "<Hello World>"` # encode as "<Hello World>"
|
||||||
* Note that url encoding for arguments is not the same as html encoding for
|
* Note that url encoding for arguments is not the same as html encoding for
|
||||||
* presentation. -d decodes a url-encoded argument while -e encodes in html
|
* presentation. -d decodes an url-encoded argument while -e encodes in html
|
||||||
* for page display.
|
* for page display.
|
||||||
*
|
*
|
||||||
* httpd.conf has the following format:
|
* httpd.conf has the following format:
|
||||||
|
@ -94,6 +94,7 @@
|
||||||
* server exits with an error.
|
* server exits with an error.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/* TODO: use TCP_CORK, parse_config() */
|
||||||
|
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
#if ENABLE_FEATURE_HTTPD_USE_SENDFILE
|
#if ENABLE_FEATURE_HTTPD_USE_SENDFILE
|
||||||
|
@ -1538,11 +1539,6 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
|
||||||
send_headers_and_exit(HTTP_NOT_FOUND);
|
send_headers_and_exit(HTTP_NOT_FOUND);
|
||||||
log_and_exit();
|
log_and_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG)
|
|
||||||
bb_error_msg("sending file '%s' content-type: %s",
|
|
||||||
url, found_mime_type);
|
|
||||||
|
|
||||||
/* If you want to know about EPIPE below
|
/* If you want to know about EPIPE below
|
||||||
* (happens if you abort downloads from local httpd): */
|
* (happens if you abort downloads from local httpd): */
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
@ -1570,6 +1566,11 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DEBUG)
|
||||||
|
bb_error_msg("sending file '%s' content-type: %s",
|
||||||
|
url, found_mime_type);
|
||||||
|
|
||||||
#if ENABLE_FEATURE_HTTPD_RANGES
|
#if ENABLE_FEATURE_HTTPD_RANGES
|
||||||
if (what == SEND_BODY)
|
if (what == SEND_BODY)
|
||||||
range_start = 0; /* err pages and ranges don't mix */
|
range_start = 0; /* err pages and ranges don't mix */
|
||||||
|
@ -2085,7 +2086,7 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
|
||||||
header_ptr += 2;
|
header_ptr += 2;
|
||||||
write(proxy_fd, header_buf, header_ptr - header_buf);
|
write(proxy_fd, header_buf, header_ptr - header_buf);
|
||||||
free(header_buf); /* on the order of 8k, free it */
|
free(header_buf); /* on the order of 8k, free it */
|
||||||
/* cgi_io_loop_and_exit needs to have two disctinct fds */
|
/* cgi_io_loop_and_exit needs to have two distinct fds */
|
||||||
cgi_io_loop_and_exit(proxy_fd, dup(proxy_fd), length);
|
cgi_io_loop_and_exit(proxy_fd, dup(proxy_fd), length);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user