Minor refactoring

This commit is contained in:
Miroslav Stampar 2012-08-31 10:43:06 +02:00
parent 74a5d41272
commit 2806185989

View File

@ -159,7 +159,7 @@ def __setRequestParams():
# Url encoding of the header values should be avoided
# Reference: http://stackoverflow.com/questions/5085904/is-ok-to-urlencode-the-value-in-headerlocation-value
httpHeader = "-".join(_.capitalize() for _ in (httpHeader or "").split("-"))
httpHeader = httpHeader.title()
if httpHeader == HTTPHEADER.USER_AGENT:
conf.parameters[PLACE.USER_AGENT] = urldecode(headerValue)