mirror of https://gitlab.com/bashrc2/epicyon
Encode string as bytes
parent
3ae7928dec
commit
832937de97
|
@ -1831,8 +1831,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
}
|
}
|
||||||
for mType,extensionList in mediaTypes.items():
|
for mType,extensionList in mediaTypes.items():
|
||||||
for extension in extensionList:
|
for extension in extensionList:
|
||||||
searchStr=b'Content-Type: '+mType+'/'+extension
|
searchStr='Content-Type: '+mType+'/'+extension
|
||||||
imageLocation=postBytes.find(searchStr)
|
imageLocation=postBytes.find(searchStr.encode('utf-8'))
|
||||||
filenameBase=self.server.baseDir+'/accounts/'+nickname+'@'+self.server.domain+'/upload'
|
filenameBase=self.server.baseDir+'/accounts/'+nickname+'@'+self.server.domain+'/upload'
|
||||||
if imageLocation>-1:
|
if imageLocation>-1:
|
||||||
if extension=='jpeg':
|
if extension=='jpeg':
|
||||||
|
|
Loading…
Reference in New Issue