{"action":"created","issue":{"url":"https://api.github.com/repos/pallets/werkzeug/issues/1112","repository_url":"https://api.github.com/repos/pallets/werkzeug","labels_url":"https://api.github.com/repos/pallets/werkzeug/issues/1112/labels{/name}","comments_url":"https://api.github.com/repos/pallets/werkzeug/issues/1112/comments","events_url":"https://api.github.com/repos/pallets/werkzeug/issues/1112/events","html_url":"https://github.com/pallets/werkzeug/issues/1112","id":223984839,"number":1112,"title":"SERVER_SOFTWARE in environ for test client","user":{"login":"jwg4","id":5060616,"avatar_url":"https://avatars3.githubusercontent.com/u/5060616?v=3","gravatar_id":"","url":"https://api.github.com/users/jwg4","html_url":"https://github.com/jwg4","followers_url":"https://api.github.com/users/jwg4/followers","following_url":"https://api.github.com/users/jwg4/following{/other_user}","gists_url":"https://api.github.com/users/jwg4/gists{/gist_id}","starred_url":"https://api.github.com/users/jwg4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwg4/subscriptions","organizations_url":"https://api.github.com/users/jwg4/orgs","repos_url":"https://api.github.com/users/jwg4/repos","events_url":"https://api.github.com/users/jwg4/events{/privacy}","received_events_url":"https://api.github.com/users/jwg4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-25T00:11:23Z","updated_at":"2017-04-25T11:26:16Z","closed_at":null,"body":"Would it make sense for the test client Client to add the key SERVER_SOFTWARE to the request environment which it constructs, with a value of something like 'werkzeug test client/$WERKZEUG_VERSION'? Currently the Client sets up a bunch of default value for the environment, which can be overwritten by the creator of the Client object. These include SERVER_NAME, SERVER_PORT, SERVER_HOST, etc., but not SERVER_SOFTWARE. SERVER_SOFTWARE seems to be set by werkzeug itself, by gunicorn and gevent, etc.\r\n\r\nAdding this key would make it possible for a request handler to do something with this value, which wouldn't break or have to be worked around, when tests are run using the test client. It would mean that application code which does something different, depending on which server it's run by could handle running as a test in the test client smoothly.\r\n\r\nHappy to submit a patch (which would probably be pretty simple)."},"comment":{"url":"https://api.github.com/repos/pallets/werkzeug/issues/comments/297000292","html_url":"https://github.com/pallets/werkzeug/issues/1112#issuecomment-297000292","issue_url":"https://api.github.com/repos/pallets/werkzeug/issues/1112","id":297000292,"user":{"login":"ThiefMaster","id":179599,"avatar_url":"https://avatars2.githubusercontent.com/u/179599?v=3","gravatar_id":"","url":"https://api.github.com/users/ThiefMaster","html_url":"https://github.com/ThiefMaster","followers_url":"https://api.github.com/users/ThiefMaster/followers","following_url":"https://api.github.com/users/ThiefMaster/following{/other_user}","gists_url":"https://api.github.com/users/ThiefMaster/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiefMaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiefMaster/subscriptions","organizations_url":"https://api.github.com/users/ThiefMaster/orgs","repos_url":"https://api.github.com/users/ThiefMaster/repos","events_url":"https://api.github.com/users/ThiefMaster/events{/privacy}","received_events_url":"https://api.github.com/users/ThiefMaster/received_events","type":"User","site_admin":false},"created_at":"2017-04-25T11:26:16Z","updated_at":"2017-04-25T11:26:16Z","body":"Is `SERVER_SOFTWARE` actually a required environment value? If not you should probably use `.get()` there n - then your test code will work fine as long as it doesn't choke on a `None` (or whatever default you use)"}}
{"actor":{"display_login":"ThiefMaster"}}