You are just reading the data 1 byte at a time (which BTW is very inefficient), but throwing it away instantly:
- Code: Select all
while bytes_read < content_length:
x = self.rfile.read(1)
bytes_read += 1
# you never use x!!!
You need to store data in some object and then actually save it as a file.
Your code does nothing in respect to these.