mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-06-16 02:15:48 +00:00
another mjpeg fix
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ int64_t uwsgi_sharedarea_read(int id, uint64_t pos, char *blob, uint64_t len) {
|
||||
if (!sa) return -1;
|
||||
if (pos + len > sa->max_pos + 1) return -1;
|
||||
if (len == 0) len = (sa->max_pos + 1) - pos;
|
||||
if (sa->honour_used) len = sa->used-pos;
|
||||
if (sa->honour_used && sa->used-pos < len) len = sa->used-pos ;
|
||||
uwsgi_rlock(sa->lock);
|
||||
memcpy(blob, sa->area + pos, len);
|
||||
sa->hits++;
|
||||
|
||||
@@ -10,7 +10,7 @@ def application(env, start_response):
|
||||
('Cache-Control', 'no-cache'),
|
||||
('Cache-Control', 'private'),
|
||||
('Pragma', 'no-cache'),
|
||||
('Content-Type', 'multipart/x-mixed-replace; boundary=--' + boundary),
|
||||
('Content-Type', 'multipart/x-mixed-replace; boundary=' + boundary),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -21,5 +21,5 @@ def application(env, start_response):
|
||||
print os.system('screencapture -t jpg -m -T 1 screenshot.jpg')
|
||||
f = open('screenshot.jpg')
|
||||
yield env['wsgi.file_wrapper'](f)
|
||||
yield "--%s\r\n" % boundary
|
||||
yield "\r\n--%s\r\n" % boundary
|
||||
#os.system('./isightcapture -w 640 -h 480 screenshot.jpg')
|
||||
|
||||
Reference in New Issue
Block a user