mirror of https://gitlab.com/bashrc2/epicyon
Capital
parent
6d9416bb40
commit
f32ee82683
|
@ -2375,19 +2375,19 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# 1 = new post success
|
# 1 = new post success
|
||||||
# -1 = new post failed
|
# -1 = new post failed
|
||||||
# 2 = new post canceled
|
# 2 = new post canceled
|
||||||
if ' boundary=' in headers['Content-type']:
|
if ' boundary=' in headers['Content-Type']:
|
||||||
nickname=None
|
nickname=None
|
||||||
nicknameStr=path.split('/users/')[1]
|
nicknameStr=path.split('/users/')[1]
|
||||||
if '/' in nicknameStr:
|
if '/' in nicknameStr:
|
||||||
nickname=nicknameStr.split('/')[0]
|
nickname=nicknameStr.split('/')[0]
|
||||||
else:
|
else:
|
||||||
return -1
|
return -1
|
||||||
length = int(headers['Content-length'])
|
length = int(headers['Content-Length'])
|
||||||
if length>self.server.maxPostLength:
|
if length>self.server.maxPostLength:
|
||||||
print('POST size too large')
|
print('POST size too large')
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
boundary=headers['Content-type'].split('boundary=')[1]
|
boundary=headers['Content-Type'].split('boundary=')[1]
|
||||||
if ';' in boundary:
|
if ';' in boundary:
|
||||||
boundary=boundary.split(';')[0]
|
boundary=boundary.split(';')[0]
|
||||||
|
|
||||||
|
@ -2669,7 +2669,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
headers[dictEntryName]=headerLine
|
headers[dictEntryName]=headerLine
|
||||||
print('New post headers: '+str(headers))
|
print('New post headers: '+str(headers))
|
||||||
|
|
||||||
print('Creating new post thread')
|
print('Creating new post thread: '+newPostThreadName)
|
||||||
self.server.newPostThread[newPostThreadName]= \
|
self.server.newPostThread[newPostThreadName]= \
|
||||||
threadWithTrace(target=self._receiveNewPostThread, \
|
threadWithTrace(target=self._receiveNewPostThread, \
|
||||||
args=(authorized,postType,path,headers),daemon=True)
|
args=(authorized,postType,path,headers),daemon=True)
|
||||||
|
|
Loading…
Reference in New Issue