From f0cdcd940e20bf049ccb19ca68a101a29d2ee8d1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 14 Nov 2010 17:36:51 +0100 Subject: [PATCH] web_server: Build as module. Autobuild-User: Jelmer Vernooij Autobuild-Date: Sun Nov 14 17:58:05 UTC 2010 on sn-devel-104 --- source4/ntp_signd/wscript_build | 3 ++- source4/web_server/web_server.h | 11 +++++++++-- source4/web_server/wscript_build | 3 +-- source4/web_server/wsgi.c | 8 ++++---- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/source4/ntp_signd/wscript_build b/source4/ntp_signd/wscript_build index f320b4a0fee..1b82bc69179 100644 --- a/source4/ntp_signd/wscript_build +++ b/source4/ntp_signd/wscript_build @@ -4,6 +4,7 @@ bld.SAMBA_MODULE('NTP_SIGND', source='ntp_signd.c', subsystem='service', init_function='server_service_ntp_signd_init', - deps='samdb NDR_NTP_SIGND LIBTSOCKET LIBSAMBA_TSOCKET' + deps='samdb NDR_NTP_SIGND LIBTSOCKET LIBSAMBA_TSOCKET', + internal_module=False, ) diff --git a/source4/web_server/web_server.h b/source4/web_server/web_server.h index 3b02feaf7d4..aa4d83c17b5 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 . */ +#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 e5863553662..de12ece38d0 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 bc55850c3bb..e1e21187284 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 . */ @@ -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; } -- 2.11.4.GIT