[projects/pld-builder.new] request_handler_server: avoid UnboundLocalError when content-length is missing
arekm
arekm at pld-linux.org
Sat Apr 25 16:39:01 CEST 2026
commit c1495fd5f598f70176d3482d5852b6594368c381
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Apr 25 16:13:59 2026 +0200
request_handler_server: avoid UnboundLocalError when content-length is missing
PLD_Builder/request_handler_server.py | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/PLD_Builder/request_handler_server.py b/PLD_Builder/request_handler_server.py
index be70ae5..ec75330 100644
--- a/PLD_Builder/request_handler_server.py
+++ b/PLD_Builder/request_handler_server.py
@@ -22,6 +22,7 @@ class MyHandler(BaseHTTPRequestHandler):
def do_POST(self):
global rootnode
+ filename = None
try:
length = int(self.headers.get('content-length'))
filename = self.headers.get('x-filename')
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/33d0188f0225eeed4f279d76812f280f6c83a2e8
More information about the pld-cvs-commit
mailing list