{"action":"created","issue":{"url":"https://api.github.com/repos/gree/unity-webview/issues/258","repository_url":"https://api.github.com/repos/gree/unity-webview","labels_url":"https://api.github.com/repos/gree/unity-webview/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/gree/unity-webview/issues/258/comments","events_url":"https://api.github.com/repos/gree/unity-webview/issues/258/events","html_url":"https://github.com/gree/unity-webview/issues/258","id":267912601,"number":258,"title":"webview opened from two different browser in Android","user":{"login":"lutfianasari","id":1013933,"avatar_url":"https://avatars2.githubusercontent.com/u/1013933?v=4","gravatar_id":"","url":"https://api.github.com/users/lutfianasari","html_url":"https://github.com/lutfianasari","followers_url":"https://api.github.com/users/lutfianasari/followers","following_url":"https://api.github.com/users/lutfianasari/following{/other_user}","gists_url":"https://api.github.com/users/lutfianasari/gists{/gist_id}","starred_url":"https://api.github.com/users/lutfianasari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lutfianasari/subscriptions","organizations_url":"https://api.github.com/users/lutfianasari/orgs","repos_url":"https://api.github.com/users/lutfianasari/repos","events_url":"https://api.github.com/users/lutfianasari/events{/privacy}","received_events_url":"https://api.github.com/users/lutfianasari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-10-24T06:32:01Z","updated_at":"2017-12-06T06:49:19Z","closed_at":null,"author_association":"NONE","body":"I don't know if it only happens on some android (i tested using Xiaomi Redmi 4), \r\nI want to open an html page on my server with GET request. I added a token key in the header using `webViewObject.AddCustomHeader(\"Authorization\", \"Bearer ....\");` \r\nSometimes, it can go as it has to be, but sometimes (I don't know, maybe the timing is not good?) the token is not there, and therefore the server reject the request.\r\n\r\nI checked the request log in my server, and it seems that there are two kinds of GET requests there with different request agent.\r\n\"HTTP_USER_AGENT\"=>\"Mozilla/5.0 (Linux; Android 6.0.1; Redmi 4 Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36\"\r\n--> With this agent, the token is not there.\r\n\r\n\"HTTP_USER_AGENT\"=>\"Dalvik/2.1.0 (Linux; U; Android 6.0.1; Redmi 4 MIUI/V8.0.5.0.0.MBECNDG)\"\r\n--> With this agent, the token is there\r\n\r\nIs there a way to choose which browser we want to use?\r\n\r\nIn POST request, by the way, the behavior is a little bit different.\r\nWhen it supposed to do only POST, it does a GET request, and then POST request after that.\r\nIs it the android webview problem? because I saw some similar issues in StackOverFlow."},"comment":{"url":"https://api.github.com/repos/gree/unity-webview/issues/comments/349551225","html_url":"https://github.com/gree/unity-webview/issues/258#issuecomment-349551225","issue_url":"https://api.github.com/repos/gree/unity-webview/issues/258","id":349551225,"user":{"login":"KojiNakamaru","id":2645978,"avatar_url":"https://avatars3.githubusercontent.com/u/2645978?v=4","gravatar_id":"","url":"https://api.github.com/users/KojiNakamaru","html_url":"https://github.com/KojiNakamaru","followers_url":"https://api.github.com/users/KojiNakamaru/followers","following_url":"https://api.github.com/users/KojiNakamaru/following{/other_user}","gists_url":"https://api.github.com/users/KojiNakamaru/gists{/gist_id}","starred_url":"https://api.github.com/users/KojiNakamaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KojiNakamaru/subscriptions","organizations_url":"https://api.github.com/users/KojiNakamaru/orgs","repos_url":"https://api.github.com/users/KojiNakamaru/repos","events_url":"https://api.github.com/users/KojiNakamaru/events{/privacy}","received_events_url":"https://api.github.com/users/KojiNakamaru/received_events","type":"User","site_admin":false},"created_at":"2017-12-06T06:49:19Z","updated_at":"2017-12-06T06:49:19Z","author_association":"MEMBER","body":"> so, will the user agent always be the same now?\r\n\r\nYes, with the HEAD of this branch the user agent should always be the same (though the issue of POST remains). I'll merge it to the master later."}}
{"actor":{"display_login":"KojiNakamaru"}}