xref: /lighttpd1.4/src/http_cgi.h (revision c95f832f)
1*c95f832fSGlenn Strauss /*
2*c95f832fSGlenn Strauss  * http_cgi - Common Gateway Interface (CGI) interfaces (RFC 3875)
3*c95f832fSGlenn Strauss  *
4*c95f832fSGlenn Strauss  * Copyright(c) 2016-2017 Glenn Strauss gstrauss()gluelogic.com  All rights reserved
5*c95f832fSGlenn Strauss  * License: BSD 3-clause (same as lighttpd)
6*c95f832fSGlenn Strauss  */
7*c95f832fSGlenn Strauss #ifndef INCLUDED_HTTP_CGI_H
8*c95f832fSGlenn Strauss #define INCLUDED_HTTP_CGI_H
9*c95f832fSGlenn Strauss #include "first.h"
10*c95f832fSGlenn Strauss 
11*c95f832fSGlenn Strauss #include "base_decls.h"
12*c95f832fSGlenn Strauss #include "buffer.h"
13*c95f832fSGlenn Strauss 
14*c95f832fSGlenn Strauss typedef struct http_cgi_opts_t {
15*c95f832fSGlenn Strauss   int authorizer;
16*c95f832fSGlenn Strauss   int break_scriptfilename_for_php;
17*c95f832fSGlenn Strauss   const buffer *docroot;
18*c95f832fSGlenn Strauss   const buffer *strip_request_uri;
19*c95f832fSGlenn Strauss } http_cgi_opts;
20*c95f832fSGlenn Strauss 
21*c95f832fSGlenn Strauss typedef int (*http_cgi_header_append_cb)(void *vdata, const char *k, size_t klen, const char *v, size_t vlen);
22*c95f832fSGlenn Strauss 
23*c95f832fSGlenn Strauss int http_cgi_headers (request_st *r, http_cgi_opts *opts, http_cgi_header_append_cb cb, void *vdata);
24*c95f832fSGlenn Strauss 
25*c95f832fSGlenn Strauss handler_t http_cgi_local_redir (request_st *r);
26*c95f832fSGlenn Strauss 
27*c95f832fSGlenn Strauss #endif
28