mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-05-01 20:33:43 +00:00
added body to spooler
This commit is contained in:
@@ -1023,7 +1023,7 @@ void uwsgi_python_add_item(char *key, uint16_t keylen, char *val, uint16_t valle
|
||||
PyDict_SetItem(pydict, PyString_FromStringAndSize(key, keylen), PyString_FromStringAndSize(val, vallen));
|
||||
}
|
||||
|
||||
int uwsgi_python_spooler(char *buf, uint16_t len) {
|
||||
int uwsgi_python_spooler(char *buf, uint16_t len, char *body, size_t body_len) {
|
||||
|
||||
static int random_seed_reset = 0;
|
||||
|
||||
@@ -1057,6 +1057,9 @@ int uwsgi_python_spooler(char *buf, uint16_t len) {
|
||||
}
|
||||
|
||||
pyargs = PyTuple_New(1);
|
||||
if (body && body_len > 0) {
|
||||
PyDict_SetItemString(spool_dict, "body", PyString_FromStringAndSize(body, body_len));
|
||||
}
|
||||
PyTuple_SetItem(pyargs, 0, spool_dict);
|
||||
|
||||
ret = python_call(spool_func, pyargs, 0);
|
||||
|
||||
Reference in New Issue
Block a user