From 6d25fff3f93eb89a87742bf3be24fa87724fe550 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 30 Aug 2011 23:58:31 -0400 Subject: [PATCH] Added Josselin Jacquard to AUTHORS --- AUTHORS | 1 + requests/utils.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1eabf65..8497a09 100644 --- a/AUTHORS +++ b/AUTHORS @@ -42,3 +42,4 @@ Patches and Suggestions - Alejandro Giacometti - Rick Mak - Johan Bergström +- Josselin Jacquard diff --git a/requests/utils.py b/requests/utils.py index d21966c..27423ee 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -150,8 +150,10 @@ def get_encoding_from_headers(headers): """ content_type = headers.get('content-type') - if not content_type : - return + + if not content_type: + return None + content_type, params = cgi.parse_header(content_type) if 'charset' in params: -- 2.34.1