{"action":"opened","issue":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1430","repository_url":"https://api.github.com/repos/mitmproxy/mitmproxy","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1430/labels{/name}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1430/comments","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1430/events","html_url":"https://github.com/mitmproxy/mitmproxy/issues/1430","id":167456239,"number":1430,"title":"HTTP2: Cannot change host in inline script.","user":{"login":"mhils","id":1019198,"avatar_url":"https://avatars.githubusercontent.com/u/1019198?v=3","gravatar_id":"","url":"https://api.github.com/users/mhils","html_url":"https://github.com/mhils","followers_url":"https://api.github.com/users/mhils/followers","following_url":"https://api.github.com/users/mhils/following{/other_user}","gists_url":"https://api.github.com/users/mhils/gists{/gist_id}","starred_url":"https://api.github.com/users/mhils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhils/subscriptions","organizations_url":"https://api.github.com/users/mhils/orgs","repos_url":"https://api.github.com/users/mhils/repos","events_url":"https://api.github.com/users/mhils/events{/privacy}","received_events_url":"https://api.github.com/users/mhils/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/labels/bug","name":"bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-25T20:21:22Z","updated_at":"2016-07-25T20:21:22Z","closed_at":null,"body":"##### Steps to reproduce the problem:\r\n\r\n1. Start mitmdump with the following inline script:\r\n\r\n```python\r\ndef request(flow):\r\n\tif flow.request.host == \"google.com\":\r\n\t\tflow.request.host = \"example.com\"\r\n```\r\n\r\n2. Use a HTTP2-capable browser to open google.com\r\n\r\n##### What is the expected behavior?\r\nRequests should be redirected to example.com.\r\n\r\n##### What went wrong?\r\nRequests are answered by google.com, even though the UI indicates example.com.\r\n\r\n##### Any other comments? What have you tried so far?\r\nThis issue can be mitigated by passing `--no-http2`.\r\nImplementing host change for HTTP2 is super tricky, so we may not go for this right now. \r\nHowever, the user should get a visible notification when changing hosts and the request should probably be aborted.\r\n\r\n---\r\n\r\nMitmproxy Version: master\r\nOperating System: Win10 x64"}}
{"actor":{"display_login":"mhils"}}