Show More
@@ -18,6 +18,7 b'' | |||
|
18 | 18 | import re |
|
19 | 19 | import logging |
|
20 | 20 | |
|
21 | from gunicorn.http.errors import NoMoreData | |
|
21 | 22 | from pyramid.config import Configurator |
|
22 | 23 | from pyramid.response import Response, FileIter |
|
23 | 24 | from pyramid.httpexceptions import ( |
@@ -166,9 +167,14 b' def lfs_objects_oid_upload(request):' | |||
|
166 | 167 | # read in chunks as stream comes in from Gunicorn |
|
167 | 168 | # this is a specific Gunicorn support function. |
|
168 | 169 | # might work differently on waitress |
|
169 | chunk = body.read(blksize) | |
|
170 | try: | |
|
171 | chunk = body.read(blksize) | |
|
172 | except NoMoreData: | |
|
173 | chunk = None | |
|
174 | ||
|
170 | 175 | if not chunk: |
|
171 | 176 | break |
|
177 | ||
|
172 | 178 | f.write(chunk) |
|
173 | 179 | |
|
174 | 180 | return {'upload': 'ok'} |
General Comments 0
You need to be logged in to leave comments.
Login now