소스 검색

Manage empty strings for CONTENT_LENGTH header

Guillaume Ayoub 15 년 전
부모
커밋
51853a22bc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      radicale/__init__.py

+ 1 - 1
radicale/__init__.py

@@ -129,7 +129,7 @@ class Application(object):
         log.LOGGER.debug("Request headers:\n%s" % environ.items())
 
         # Get content
-        content_length = int(environ.get("CONTENT_LENGTH", 0))
+        content_length = int(environ.get("CONTENT_LENGTH") or 0)
         if content_length:
             content = self.decode(
                 environ["wsgi.input"].read(content_length), environ)