mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-08 06:31:58 +00:00
OSX fixes
This commit is contained in:
@@ -497,7 +497,7 @@ int bind_to_tcp(char *socket_name, int listen_queue, char *tcp_port) {
|
||||
|
||||
if (uwsgi.reuse_port) {
|
||||
#ifdef SO_REUSEPORT
|
||||
if (setsockopt(serverfd, SOL_SOCKET, SO_REUSEPORT, (const void *) &reuse_port, sizeof(int)) < 0) {
|
||||
if (setsockopt(serverfd, SOL_SOCKET, SO_REUSEPORT, (const void *) &uwsgi.reuse_port, sizeof(int)) < 0) {
|
||||
uwsgi_error("setsockopt()");
|
||||
uwsgi_nuclear_blast();
|
||||
}
|
||||
|
||||
+4
-3
@@ -5,8 +5,9 @@ def application(env, start_response):
|
||||
start_response('200 Ok', [('Content-type', 'text/plain')])
|
||||
#for x in env['wsgi.input']:
|
||||
# yield x
|
||||
body = env['wsgi.input'].readline()
|
||||
print body
|
||||
body = env['wsgi.input'].read(int(env['CONTENT_LENGTH']))
|
||||
body += env['wsgi.input'].readline()
|
||||
#print body
|
||||
body += env['wsgi.input'].read(100)
|
||||
body += env['wsgi.input'].read(100)
|
||||
body += env['wsgi.input'].read()
|
||||
@@ -17,7 +18,7 @@ def application(env, start_response):
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<textarea name="pluto">
|
||||
</textarea>
|
||||
<input type="test" name="pippo" />
|
||||
<input type="file" name="pippo" />
|
||||
<input type="submit" value="invia" />
|
||||
</form>
|
||||
"""
|
||||
|
||||
@@ -2392,7 +2392,7 @@ int *uwsgi_attach_fd(int fd, int count, char *code, size_t code_len) {
|
||||
ret[i] = -1;
|
||||
}
|
||||
|
||||
if ((cmsg->cmsg_len - ((char *)CMSG_DATA(cmsg)- (char *)cmsg)) > (sizeof(int) * (count + 1))) {
|
||||
if ((size_t) (cmsg->cmsg_len - ((char *)CMSG_DATA(cmsg)- (char *)cmsg)) > (size_t) (sizeof(int) * (count + 1))) {
|
||||
uwsgi_log("not enough space for sockets data, consider increasing it\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user