• Mark Allen's avatar
    Add Python 2 compatibility for If-Last-Modified · ea5f54cd
    Mark Allen authored
    The serve method of the DjangoStreamingServer class support
    If-Last-Modified, and for this it requires a timestamp of the last
    modified time of the private file. Python 3 datetimes have a
    timestamp method, which is used to generate the required timestamp,
    but this isn't available in Python 2. Serving files on S3 therefore
    fails if Python 2 is used.
    
    This commit adds an alternative means of generating the timestamp
    if Python 2 is used.
    ea5f54cd
servers.py 4.46 KB