1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

39 Commits

Author SHA1 Message Date
Andrew Bartlett
0e58705a5b python: Remove Python 2.4 support macros
We require Python 2.6

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2016-01-07 23:33:10 +01:00
Jelmer Vernooij
87afc3aee1 Move python modules from source4/scripting/python/ to python/.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Mar  2 03:57:34 CET 2013 on sn-devel-104
2013-03-02 03:57:34 +01:00
Jelmer Vernooij
2618d67fe5 wsgi: Serve '500 Internal Server Error' page when errors occur.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Dec  5 18:40:25 CET 2012 on sn-devel-104
2012-12-05 18:40:25 +01:00
Jelmer Vernooij
12c72a3835 wsgi: When encountering error in Python code, print traceback to logs.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-05 14:56:43 +01:00
Jelmer Vernooij
bfc6a9e21d web_server: the web server is not multi-process, indicate so in WSGI.
This is a requirement for some of the paster middleware used by SWAT2.

Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:51 -08:00
Jelmer Vernooij
b89e7f6e51 web_server: Properly decrement reference counters for python objects in wsgi.
Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:46 -08:00
Jelmer Vernooij
ac635d02de web_server: Properly set SCRIPT_NAME and PATH_INFO.
Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:42 -08:00
Jelmer Vernooij
3bffb585ba web_server: Create a string object for SERVER_PORT variable.
This matches the behaviour of other wsgi server implementations.

Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:33 -08:00
Jelmer Vernooij
31f0e24fbe web_server/wsgi: Don't segfault when wsgi app doesn't return iterable.
There is a bug in the application if this happens, but invalid Python
code shouldn't cause segfaults.

Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:56:59 -08:00
Andrew Bartlett
15d0166340 s4-python Don't force "bin" into the python sys.path
This patch uses the fact that dyn_PYTHONDIR and dyn_PYTHONARCHDIR is
now set properly at all times, incluidng for installed and
build-directory binaries.  So we don't need to make assumptions about
bin being magic any more.

Andrew Bartlett
2011-02-07 13:22:02 +11:00
Jelmer Vernooij
04abf2cc8d web_server: Avoid references to swat. Load samba.web_server instead. 2011-01-17 00:25:42 +01:00
Jelmer Vernooij
5792fa90ac s4-python: Only set BASETYPE flag if subclassing is supported.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jan  1 03:39:58 CET 2011 on sn-devel-104
2011-01-01 03:39:58 +01:00
Matthias Dieter Wallnöfer
c8d888772a s4:dsdb/pydsdb.c and web_server/wsgi.c - remove accidentally introduced Py_RETURN_NONE
This was only thought for Python 2.3 which we generally no longer support (only
pyldb in the LDB library is an exception).
2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
05706e1801 s4:web_server/*.c - optimise includes
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 18:23:05 CET 2010 on sn-devel-104
2010-12-12 18:23:05 +01:00
Matthias Dieter Wallnöfer
978a14d40c s4:web_server/wsgi.c - fix a counter type 2010-12-12 17:27:36 +01:00
Matthias Dieter Wallnöfer
f05ddcfbe6 s4:web_server/wsgi.c - add missing Python compatibility code 2010-12-12 17:27:09 +01:00
Jelmer Vernooij
f0cdcd940e 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
2010-11-14 17:58:05 +00:00
Matthias Dieter Wallnöfer
76cd237ee5 s4:web_server/wsgi.c - free the "env" and "inputstream" objects on an "asprintf" failure 2010-05-30 11:12:25 +02:00
Matthias Dieter Wallnöfer
f11cf62016 s4:web_server/wsgi.c - provide a better out-of-memory handling for an "asprintf" call 2010-05-28 18:58:45 +02:00
Matthias Dieter Wallnöfer
ce99f9e734 s4:web_server/wsgi.c - fix "asprintf" call 2010-05-28 10:04:48 +02:00
Stefan Metzmacher
6129aa0cf5 s4:web_server: use tsocket_address functions to get the local ip and port
metze
(cherry picked from commit 9a1a00199c)
2010-04-28 15:45:02 +02:00
Matthias Dieter Wallnöfer
d1db751ff8 Revert "s4:web_server: use tsocket_address functions to get the local ip and port"
This reverts commit 9a1a00199c.

This broke the build.
2010-04-27 18:45:42 +02:00
Stefan Metzmacher
9a1a00199c s4:web_server: use tsocket_address functions to get the local ip and port
metze
2010-04-27 17:05:30 +02:00
Matthias Dieter Wallnöfer
e34637b2a6 s4:Remove "Py_RETURN_NONE" compatibility code
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Andrew Tridgell
3050f83288 s4-python: we need to include Python.h first
If we don't include Python.h first then we get a pile of warnings due
to broken redefines of XOPEN_SOURCE in the Python includes.
2009-10-23 16:23:01 +11:00
Stefan Metzmacher
62c8f6b1a5 s4:web_server: s/private/private_data
metze
2009-02-02 13:08:50 +01:00
Jelmer Vernooij
ba5d6e6d70 Avoid using a utility header for Python replacements included in Samba,
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 2009-01-07 15:03:16 -08:00
Jelmer Vernooij
d2c70d24e1 py: Properly increase the reference counter of Py_None. 2009-01-06 04:13:57 +01:00
Jelmer Vernooij
bd64688c6a Fix more compiler warnings in various places. 2008-12-23 22:57:11 +01:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Jelmer Vernooij
f3d513b378 Support POST requests again, provide more variables in environment. 2008-09-21 20:01:00 +02:00
Jelmer Vernooij
1ed040d8e2 First GET request works. SWAT now displays a Hello world message. 2008-09-21 19:03:12 +02:00
Jelmer Vernooij
4141e70da9 Properly call WSGI request handler when requests come in. 2008-09-21 18:45:09 +02:00
Jelmer Vernooij
1271066234 Remove support for ESP in the web server. 2008-09-21 16:53:29 +02:00
Jelmer Vernooij
fda85985e9 Remove some dependencies of the web server on esp. 2008-09-21 16:03:52 +02:00
Jelmer Vernooij
2df040d899 Add input / error stream objects in WSGI implementation. 2008-09-21 16:03:52 +02:00
Jelmer Vernooij
a4e8ff7429 Add more parts of the WSGI implementation. 2008-09-21 16:03:52 +02:00
Jelmer Vernooij
4bb17b60ef Add initial work on WSGI support in the web server. 2008-09-21 16:03:52 +02:00