]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- more python 3.x fixes
authorMarcin Krol <hawk@tld-linux.org>
Mon, 22 Mar 2021 00:57:05 +0000 (01:57 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 22 Mar 2021 00:57:05 +0000 (01:57 +0100)
TLD_Builder/request_handler_server.py

index 8f9200fe6586f3f17e10dd76a473ee289cd3b907..255572ffcb9d4f36169a34807e2756fc8b22c316 100644 (file)
@@ -24,8 +24,8 @@ class MyHandler(BaseHTTPRequestHandler):
     def do_POST(self):
         global rootnode
         try:
-            length = int(self.headers.getheader('content-length'))
-            filename = self.headers.getheader('x-filename')
+            length = int(self.headers.get('content-length'))
+            filename = self.headers.get('x-filename')
             if not length:
                 log.error("request_handler_server: [%s]: 401 Unauthorized" % self.client_address[0])
                 self.send_error(401)