Add Python 2 compatibility for If-Last-Modified
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.
Please register or sign in to comment