lighttpd 1.4.x https://www.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.2 KiB

#ifndef _RESPONSE_H_
#define _RESPONSE_H_
#include "first.h"
#include "server.h"
#include <time.h>
int http_response_parse(server *srv, connection *con);
int http_response_write_header(server *srv, connection *con);
int response_header_insert(server *srv, connection *con, const char *key, size_t keylen, const char *value, size_t vallen);
int response_header_overwrite(server *srv, connection *con, const char *key, size_t keylen, const char *value, size_t vallen);
int response_header_append(server *srv, connection *con, const char *key, size_t keylen, const char *value, size_t vallen);
handler_t http_response_prepare(server *srv, connection *con);
int http_response_redirect_to_directory(server *srv, connection *con);
int http_response_handle_cachable(server *srv, connection *con, buffer * mtime);
void http_response_send_file (server *srv, connection *con, buffer *path);
[mod_fastcgi] use http_response_xsendfile() (fixes #799, fixes #851, fixes #2017, fixes #2076) handle X-Sendfile and X-LIGHTTPD-send-file w/ http_response_xsendfile() if host is configured ( &#34;x-sendfile&#34; = &#34;enable&#34; ) Note: X-Sendfile path is url-decoded for consistency, like X-Sendfile2 (response headers should be url-encoded to avoid tripping over chars allowed in filesystem but which might change response header parsing semantics) Note: deprecated: &#34;allow-x-send-file&#34;; use &#34;x-sendfile&#34; Note: deprecated: X-LIGHTTPD-send-file header; use X-Sendfile header Note: deprecated: X-Sendfile2 header; use X-Sendfile header For now, X-Sendfile2 is still handled internally by mod_fastcgi. Since http_response_send_file() supports HTTP Range requests, X-Sendfile2 is effectively obsolete. However, any code, e.g. PHP, currently using X-Sendfile2 is probably manually generating 206 Partial Content status and Range response headers. A future version of lighttpd might *remove* X-Sendfile2. Existing code should be converted to use X-Sendfile, which is easily done by removing all the special logic around using X-Sendfile2, since the 206 Partial Content status and Range response headers are handled in http_response_send_file(). x-ref: &#34;mod_fastcgi + X-Sendfile -&gt; mod_staticfile&#34; https://redmine.lighttpd.net/issues/799 &#34;Feature Request: New option &#34;x-send-file-docroot&#34;&#34; https://redmine.lighttpd.net/issues/851 &#34;X-Sendfile handoff to mod-static-file in 1.4.x&#34; https://redmine.lighttpd.net/issues/2017 &#34;X-sendfile should be able to set content-type&#34; https://redmine.lighttpd.net/issues/2076
6 years ago
void http_response_xsendfile (server *srv, connection *con, buffer *path, const array *xdocroot);
void http_response_backend_done (server *srv, connection *con);
void http_response_backend_error (server *srv, connection *con);
buffer * strftime_cache_get(server *srv, time_t last_mod);
#endif