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