Skip to content

Commit

Permalink
delete title() and rebased to master
Browse files Browse the repository at this point in the history
  • Loading branch information
marc authored and marc committed Jul 18, 2019
1 parent 3775858 commit 876db14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scrapy/utils/curl.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def error(self, message):


def curl_to_request_kwargs(curl_args):
"""Convert a curl command syntax to Request kwargs
"""Convert a curl command syntax to Request kwargs.
:param curl_args: string containing the curl command
:return: dictionary of Request kwargs
Expand Down Expand Up @@ -60,7 +60,7 @@ def curl_to_request_kwargs(curl_args):
cookies = {}
for header in parsed_args.headers or ():
name, val = header.split(':', 1)
name = name.strip().title()
name = name.strip()
val = val.strip()
if name == 'Cookie':
for name, morsel in iteritems(SimpleCookie(val)):
Expand Down
7 changes: 3 additions & 4 deletions tests/test_http_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,10 +1046,9 @@ def test_from_response_unicode_xpath(self):

xpath = u"//form[@name='\u03b1']"
encoded = xpath if six.PY3 else xpath.encode('unicode_escape')
six.assertRaisesRegex(self,
ValueError, re.escape(encoded),
self.request_class.from_response,
response, formxpath=xpath)
self.assertRaisesRegex(ValueError, re.escape(encoded),
self.request_class.from_response,
response, formxpath=xpath)

def test_from_response_button_submit(self):
response = _buildresponse(
Expand Down

0 comments on commit 876db14

Please sign in to comment.