diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-11-14 17:36:51 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-11-14 17:58:05 +0000 |
commit | f0cdcd940e20bf049ccb19ca68a101a29d2ee8d1 (patch) | |
tree | 0a4a899693561fd378e75dcc305d7ef493dd47d5 /source4 | |
parent | f5fbba76c8743d6c4f25b9850e2c2c4353730cdf (diff) | |
download | samba-f0cdcd940e20bf049ccb19ca68a101a29d2ee8d1.tar.gz samba-f0cdcd940e20bf049ccb19ca68a101a29d2ee8d1.tar.bz2 samba-f0cdcd940e20bf049ccb19ca68a101a29d2ee8d1.zip |
web_server: Build as module.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov 14 17:58:05 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r-- | source4/ntp_signd/wscript_build | 3 | ||||
-rw-r--r-- | source4/web_server/web_server.h | 11 | ||||
-rw-r--r-- | source4/web_server/wscript_build | 3 | ||||
-rw-r--r-- | 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 f320b4a0fe..1b82bc6917 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 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; } |