[Pkg-mozext-commits] [greasemonkey] 02/16: Set the Accept header to let the server know we want a user script metadata block. Closes #1824.

David Prévot taffit at moszumanska.debian.org
Thu Jan 30 13:42:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 5d1f10f665e57bafa2212b1ad161b795aa5c9d17
Author: sizzlemctwizzle <medleymind at gmail.com>
Date:   Tue Nov 5 19:16:36 2013 -0600

    Set the Accept header to let the server know we want a user script metadata block. Closes #1824.
---
 modules/script.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/script.js b/modules/script.js
index 9c4cfde..fe02ace 100644
--- a/modules/script.js
+++ b/modules/script.js
@@ -731,7 +731,9 @@ Script.prototype.checkForRemoteUpdate = function(aCallback, aForced) {
       .createInstance(Components.interfaces.nsIXMLHttpRequest);
   req.overrideMimeType('application/javascript');
   req.open("GET", url, true);
-  req.setRequestHeader('X-Userscript-Update', 'Greasemonkey');
+  
+  // Let the server know we want a user script metadata block
+  req.setRequestHeader('Accept', 'text/x-userscript-meta');
   req.onload = GM_util.hitch(
       this, "checkRemoteVersion", req, aCallback, aForced);
   req.onerror = GM_util.hitch(null, aCallback, false);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list