{"action":"closed","issue":{"url":"https://api.github.com/repos/QupZilla/qupzilla/issues/1903","repository_url":"https://api.github.com/repos/QupZilla/qupzilla","labels_url":"https://api.github.com/repos/QupZilla/qupzilla/issues/1903/labels{/name}","comments_url":"https://api.github.com/repos/QupZilla/qupzilla/issues/1903/comments","events_url":"https://api.github.com/repos/QupZilla/qupzilla/issues/1903/events","html_url":"https://github.com/QupZilla/qupzilla/issues/1903","id":144463824,"number":1903,"title":"GreaseMonkey: `GM_UrlInterceptor::interceptRequest` too aggressive","user":{"login":"Martii","id":114709,"avatar_url":"https://avatars.githubusercontent.com/u/114709?v=3","gravatar_id":"","url":"https://api.github.com/users/Martii","html_url":"https://github.com/Martii","followers_url":"https://api.github.com/users/Martii/followers","following_url":"https://api.github.com/users/Martii/following{/other_user}","gists_url":"https://api.github.com/users/Martii/gists{/gist_id}","starred_url":"https://api.github.com/users/Martii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martii/subscriptions","organizations_url":"https://api.github.com/users/Martii/orgs","repos_url":"https://api.github.com/users/Martii/repos","events_url":"https://api.github.com/users/Martii/events{/privacy}","received_events_url":"https://api.github.com/users/Martii/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-30T04:52:47Z","updated_at":"2016-03-30T06:40:40Z","closed_at":"2016-03-30T06:40:40Z","body":"Currently when using `XMLHttpRequest()` to gather the meta routine via a .user.js it prompts to install in a Userscript. *UNEXPECTED BEHAVIOR*\r\n\r\nSome possible solutions *(logic wise)*:\r\n\r\n1. Check for an `Accept` request header present of `text/x-userscript-meta` and don't trigger the url interceptor with an install as per current specs.\r\n2. If a query string e.g. `?blahA=1&blahB` or empty e.g. `?`and/or a hash e.g. `#yaddaying` or empty `#` are present it shouldn't trigger the url interceptor with an install as per current specs.\r\n\r\nIdeally any `XMLHttpRequest()` with no query string and hash in a .user.js should never trigger an install UI action too.\r\n\r\nAffected versions:\r\n* `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QupZilla/1.9.99 Chrome/45.0.2454.101 Safari/537.36`  with items 1 and 2, and also in the address bar.\r\n* `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) QupZilla/1.8.9 Safari/538.1` with item 2 only, and also in the address bar.\r\n\r\nRelated:\r\n* #1653\r\n\r\nRefs:\r\n* [`7191729`/src/plugins/GreaseMonkey/gm_urlinterceptor.cpp#L27-L33](https://github.com/QupZilla/qupzilla/blob/7191729eb90d9cba1c9d89d15a64cb84a9d5fcb7/src/plugins/GreaseMonkey/gm_urlinterceptor.cpp#L27-L33)\r\n* http://doc.qt.io/qt-5/qwebengineurlrequestinfo.html#navigationType\r\n    * http://doc.qt.io/qt-5/qwebengineurlrequestinfo.html#NavigationType-enum\r\n    * http://doc.qt.io/qt-5/qwebengineurlrequestinfo.html#ResourceType-enum *(esp. `QWebEngineUrlRequestInfo::ResourceTypeXhr`)*\r\n* http://doc.qt.io/qt-5/qnetworkrequest.html#hasRawHeader *(or similar since doesn't appear in [knownHeaders](http://doc.qt.io/qt-5/qnetworkrequest.html#KnownHeaders-enum) ... class not visibly present in argument vectors at this referenced code point)*\r\n    * http://doc.qt.io/qt-5/qnetworkrequest.html#rawHeader\r\n* [oujs - Meta View](https://openuserjs.org/scripts/Marti/oujs_-_Meta_View) Unit Test\r\n\r\nP.S. Until I get a little more versed with ArchLinux, the Code base here, and get a working VNC Server *(which ever one I end up with since that machine is quite a ways away)* ... it's going to be a bit slow for me to do PR's... sorry... but this is my guess where a fix might be applied. :)\r\n\r\nTIA."}}