Donate CPU: get package

This commit is contained in:
Daniel Marjamäki 2018-08-25 11:08:41 +02:00
parent 4ece582bed
commit 18343d1122
1 changed files with 2 additions and 2 deletions

View File

@ -142,8 +142,8 @@ while True:
elif cmd.startswith('GET /'): elif cmd.startswith('GET /'):
print('[' + strDateTime() + '] ' + cmd) print('[' + strDateTime() + '] ' + cmd)
package = cmd[5:] package = cmd[5:]
if package.endswith(' HTTP'): if package.find(' ') > 0:
package = package[:-5] package = package[:package.find(' ')]
filename = resultPath + '/' + package filename = resultPath + '/' + package
print('filename:"' + filename + '"') print('filename:"' + filename + '"')
if not os.path.isfile(filename): if not os.path.isfile(filename):