web_server: Build as module.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 14 Nov 2010 16:36:51 +0000 (17:36 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 14 Nov 2010 17:58:05 +0000 (17:58 +0000)
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov 14 17:58:05 UTC 2010 on sn-devel-104

source4/ntp_signd/wscript_build
source4/web_server/web_server.h
source4/web_server/wscript_build
source4/web_server/wsgi.c

index f320b4a0feef45dc3f034fd9883c8afdb284c0e0..1b82bc691795f570caaa9efdfdf7242d93def896 100644 (file)
@@ -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,
        )
 
index 3b02feaf7d4a7a88a809469a6a40aa690f072ee9..aa4d83c17b5c972f6dc347f7be47e7a72bcf2724 100644 (file)
@@ -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__ */
index e58635536620fb14fa7097b4a43574dff6fd3055..de12ece38d012c896d6e5222bfc4e3ad06edad90 100644 (file)
@@ -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,
                )
index bc55850c3bb7ebeacb935674384f67f34bb26abd..e1e211872843df1d862aa514e2f71a43fd5e23dc 100644 (file)
@@ -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;
 }