You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constrequest=require("request");functionwithUserAgent(userAgent){return{url: "https://polyfill.app/api/polyfill?features=intl.list-format",headers: {"User-Agent": userAgent}};}// this is a real user agent from mi browser in a Xiaomi phoneconstchrome71xiaomi="Mozilla/5.0 (Linux; U; Android 10; en-us; SM-G975F Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/12.1.3-g";// this is a real user agent from a Pixel 2 XLconstchrome71="Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.141 Mobile Safari/537.36";// This one is just like the above one, but with "XiaoMi/MiuiBrowser/12.1.3-g" added at the endconstchrome71fake="Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/12.1.3-g";request(withUserAgent(chrome71xiaomi),(error,response,body)=>console.log("chrome71xiaomi: ",body.length));request(withUserAgent(chrome71),(error,response,body)=>console.log("chrome71: ",body.length));request(withUserAgent(chrome71fake),(error,response,body)=>console.log("chrome71fake: ",body.length));
The resulting log is:
chrome71xiaomi: 0
chrome71fake: 0
chrome71: 15477
Which is obviously an error.
The text was updated successfully, but these errors were encountered:
The error can be reproduced as the following:
The resulting log is:
Which is obviously an error.
The text was updated successfully, but these errors were encountered: