Changeset 8215 for django/branches/gis/django/http/multipartparser.py
- Timestamp:
- 08/05/08 12:15:33 (5 months ago)
- Files:
-
- django/branches/gis (modified) (1 prop)
- django/branches/gis/django/http/multipartparser.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis
- Property svnmerge-integrated changed from /django/trunk:1-7978 to /django/trunk:1-8214
django/branches/gis/django/http/multipartparser.py
r7918 r8215 5 5 file upload handlers for processing. 6 6 """ 7 7 8 import cgi 8 9 from django.conf import settings … … 13 14 from django.core.files.uploadhandler import StopUpload, SkipFile, StopFutureHandlers 14 15 15 __all__ = ('MultiPartParser', 'MultiPartParserError','InputStreamExhausted')16 __all__ = ('MultiPartParser', 'MultiPartParserError', 'InputStreamExhausted') 16 17 17 18 class MultiPartParserError(Exception): … … 163 164 elif item_type == FILE: 164 165 # This is a file, use the handler... 165 file_successful = True166 166 file_name = disposition.get('filename') 167 167 if not file_name: … … 210 210 211 211 except SkipFile, e: 212 file_successful = False213 212 # Just use up the rest of this file... 214 213 exhaust(field_stream) … … 516 515 end = index 517 516 next = index + len(self._boundary) 518 data_len = len(data) - 1519 517 # backup over CRLF 520 518 if data[max(0,end-1)] == '\n': … … 522 520 if data[max(0,end-1)] == '\r': 523 521 end -= 1 524 # skip over --CRLF525 #if data[min(data_len,next)] == '-':526 # next += 1527 #if data[min(data_len,next)] == '-':528 # next += 1529 #if data[min(data_len,next)] == '\r':530 # next += 1531 #if data[min(data_len,next)] == '\n':532 # next += 1533 522 return end, next 534 523
