]> git.ipfire.org Git - thirdparty/tornado.git/commit
Added default User-Agent to the simple http client if not provided.
authorFlavio Garcia <piraz@candango.org>
Sun, 26 Apr 2020 20:18:26 +0000 (16:18 -0400)
committerGitHub <noreply@github.com>
Sun, 26 Apr 2020 20:18:26 +0000 (16:18 -0400)
commitc3c263de0a7b627af4ea3b729a32acd2ddd99d38
tree94a161ac40c49678523bb74a8415a387914ec00f
parent58d678bf31be80fefeeb2b0eead43b4471dbeaef
Added default User-Agent to the simple http client if not provided.

The User-Agent format is "Tornado\{Tornado_Version}".

If self.request.user_agent isn't set and self.request.headers has
no User-Agent in it's keys the default User-Agent is added.

Fixes: #2702
tornado/simple_httpclient.py
tornado/test/simple_httpclient_test.py