Django

Code

Show
Ignore:
Timestamp:
07/21/08 22:26:25 (4 months ago)
Author:
adrian
Message:

Fixed #7848 -- Removed a bunch of code that wasn't contributing to society. Thanks, julien

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/http/multipartparser.py

    r7905 r8047  
    55file upload handlers for processing. 
    66""" 
     7 
    78import cgi 
    89from django.conf import settings 
     
    1314from django.core.files.uploadhandler import StopUpload, SkipFile, StopFutureHandlers 
    1415 
    15 __all__ = ('MultiPartParser','MultiPartParserError','InputStreamExhausted') 
     16__all__ = ('MultiPartParser', 'MultiPartParserError', 'InputStreamExhausted') 
    1617 
    1718class MultiPartParserError(Exception): 
     
    163164                elif item_type == FILE: 
    164165                    # This is a file, use the handler... 
    165                     file_successful = True 
    166166                    file_name = disposition.get('filename') 
    167167                    if not file_name: 
     
    210210 
    211211                    except SkipFile, e: 
    212                         file_successful = False 
    213212                        # Just use up the rest of this file... 
    214213                        exhaust(field_stream) 
     
    516515            end = index 
    517516            next = index + len(self._boundary) 
    518             data_len = len(data) - 1 
    519517            # backup over CRLF 
    520518            if data[max(0,end-1)] == '\n': 
     
    522520            if data[max(0,end-1)] == '\r': 
    523521                end -= 1 
    524             # skip over --CRLF 
    525             #if data[min(data_len,next)] == '-': 
    526             #    next += 1 
    527             #if data[min(data_len,next)] == '-': 
    528             #    next += 1 
    529             #if data[min(data_len,next)] == '\r': 
    530             #    next += 1 
    531             #if data[min(data_len,next)] == '\n': 
    532             #    next += 1 
    533522            return end, next 
    534523