summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/web_server')
-rw-r--r--source4/web_server/web_server.h11
-rw-r--r--source4/web_server/wscript_build3
-rw-r--r--source4/web_server/wsgi.c8
3 files changed, 14 insertions, 8 deletions
diff --git a/source4/web_server/web_server.h b/source4/web_server/web_server.h
index 3b02feaf7d..aa4d83c17b 100644
--- a/source4/web_server/web_server.h
+++ b/source4/web_server/web_server.h
@@ -17,6 +17,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef __WEB_SERVER_H__
+#define __WEB_SERVER_H__
+
#include "smbd/process_model.h"
struct websrv_context;
@@ -60,6 +63,10 @@ struct websrv_context {
struct session_data *session;
};
+bool wsgi_initialize(struct web_server_data *wdata);
+void http_error(struct websrv_context *web, const char *status, const char *info);
+void websrv_output_headers(struct websrv_context *web, const char *status, struct http_header *headers);
+void websrv_output(struct websrv_context *web, void *data, size_t length);
+NTSTATUS http_parse_header(struct websrv_context *web, const char *line);
-#include "web_server/proto.h"
-
+#endif /* __WEB_SERVER_H__ */
diff --git a/source4/web_server/wscript_build b/source4/web_server/wscript_build
index e586355366..de12ece38d 100644
--- a/source4/web_server/wscript_build
+++ b/source4/web_server/wscript_build
@@ -10,10 +10,9 @@ bld.SAMBA_SUBSYSTEM('WEB_WSGI',
bld.SAMBA_MODULE('WEB',
source='web_server.c',
- autoproto='proto.h',
- autoproto_extra_source='wsgi.c',
subsystem='service',
init_function='server_service_web_init',
deps='LIBTLS process_model LIBPYTHON WEB_WSGI',
pyembed=True,
+ internal_module=False,
)
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index bc55850c3b..e1e2118728 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -5,17 +5,17 @@
Implementation of the WSGI interface described in PEP0333
(http://www.python.org/dev/peps/pep-0333)
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -189,7 +189,7 @@ static PyObject *py_input_read(PyObject *_self, PyObject *args, PyObject *kwargs
ret = PyString_FromStringAndSize((char *)self->web->input.partial.data+self->offset, size);
self->offset += size;
-
+
return ret;
}