forked from indymedia/epicyon
More debug
parent
1551c20420
commit
f229f3bf35
|
@ -703,12 +703,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
print('DEBUG: content-length: '+str(length))
|
print('DEBUG: content-length: '+str(length))
|
||||||
if not self.headers['Content-type'].startswith('image/'):
|
if not self.headers['Content-type'].startswith('image/'):
|
||||||
if length>self.server.maxMessageLength:
|
if length>self.server.maxMessageLength:
|
||||||
|
print('Maximum message length exceeded '+str(length))
|
||||||
self.send_response(400)
|
self.send_response(400)
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
self.server.POSTbusy=False
|
self.server.POSTbusy=False
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if length>self.server.maxImageSize:
|
if length>self.server.maxImageSize:
|
||||||
|
print('Maximum image size exceeded '+str(length))
|
||||||
self.send_response(400)
|
self.send_response(400)
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
self.server.POSTbusy=False
|
self.server.POSTbusy=False
|
||||||
|
|
4
posts.py
4
posts.py
|
@ -1266,7 +1266,6 @@ def getPublicPostsOfPerson(nickname: str,domain: str, \
|
||||||
port: int,httpPrefix: str) -> None:
|
port: int,httpPrefix: str) -> None:
|
||||||
""" This is really just for test purposes
|
""" This is really just for test purposes
|
||||||
"""
|
"""
|
||||||
print("Test1")
|
|
||||||
session = createSession(domain,port,useTor)
|
session = createSession(domain,port,useTor)
|
||||||
personCache={}
|
personCache={}
|
||||||
cachedWebfingers={}
|
cachedWebfingers={}
|
||||||
|
@ -1276,13 +1275,11 @@ def getPublicPostsOfPerson(nickname: str,domain: str, \
|
||||||
if port!=80 and port!=443:
|
if port!=80 and port!=443:
|
||||||
domainFull=domain+':'+str(port)
|
domainFull=domain+':'+str(port)
|
||||||
handle=httpPrefix+"://"+domainFull+"/@"+nickname
|
handle=httpPrefix+"://"+domainFull+"/@"+nickname
|
||||||
print("Test2 "+handle)
|
|
||||||
wfRequest = \
|
wfRequest = \
|
||||||
webfingerHandle(session,handle,httpPrefix,cachedWebfingers)
|
webfingerHandle(session,handle,httpPrefix,cachedWebfingers)
|
||||||
if not wfRequest:
|
if not wfRequest:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
print('Test3')
|
|
||||||
personUrl,pubKeyId,pubKey,personId,shaedInbox,capabilityAcquisition= \
|
personUrl,pubKeyId,pubKey,personId,shaedInbox,capabilityAcquisition= \
|
||||||
getPersonBox(session,wfRequest,personCache,'outbox')
|
getPersonBox(session,wfRequest,personCache,'outbox')
|
||||||
wfResult = json.dumps(wfRequest, indent=4, sort_keys=True)
|
wfResult = json.dumps(wfRequest, indent=4, sort_keys=True)
|
||||||
|
@ -1290,7 +1287,6 @@ def getPublicPostsOfPerson(nickname: str,domain: str, \
|
||||||
maxMentions=10
|
maxMentions=10
|
||||||
maxEmoji=10
|
maxEmoji=10
|
||||||
maxAttachments=5
|
maxAttachments=5
|
||||||
print('personUrl: '+personUrl)
|
|
||||||
userPosts = getPosts(session,personUrl,30,maxMentions,maxEmoji, \
|
userPosts = getPosts(session,personUrl,30,maxMentions,maxEmoji, \
|
||||||
maxAttachments,federationList, \
|
maxAttachments,federationList, \
|
||||||
personCache,raw,simple)
|
personCache,raw,simple)
|
||||||
|
|
Loading…
Reference in New Issue