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
TM version: 3.10.4444
Browser version:39.0.2171.71 m
This is my script
Yes about 2 years later the script works fine.
Yes, and everything is fine.
I make this script for a torrent site what runs on https. I'd like to make a
function which make a call for a Deluge torrent client to download a torrent
file. For this deluge has webui_api. The login function send back a security
Cookie (i.e. Set-Cookie: _session_id=424a8c3fad3d766d9054ce7f56a5833e2253;
Expires=Tue, 02 Dec 2014 20:01:44 GMT; Path=/json). And I have to send back
this session_id to identify me.
The expected behavior is every xmlhttpRequest set back this cookies just in TM
not.
Please find a solution how can I access for it. Or if is not allowed by chrome
or any standard rules, send back like responseHedaers. Maybe you can call it
responseCookies.
Best Regards George.
Original issue reported on code.google.com by GChovany...@gmail.com on 2 Dec 2014 at 8:40
The text was updated successfully, but these errors were encountered:
// ==UserScript==// @name My Fancy New Userscript// @namespace http://use.i.E.your.homepage/// @version 0.1// @description enter something useful// @match http://www.example.org/*// @copyright 2012+, You// @grant GM_xmlhttpRequest// ==/UserScript==GM_xmlhttpRequest({method: "GET",// to avoid 304url: "http://www.example.com/?"+Math.random(),headers: {Cookie: "referrer=1",},onload: function(){console.info('got response');},});
Note in GreaseMonkey, the content in Cookie is appended after document.cookie, so the actual header GM_xmlhttpRequest sent is document.cookie + ';' + (string in Cookie option).
I don't know which one is better: directly replace the whole Cookie header or just append it, but I really hope this can act same as GreaseMonkey.
@legnaleurc Meanwhile as a workaround, can't you backup document.cookie, set it to the one you want, send the request, and then restore document.cookie?
@legnaleurc Meanwhile as a workaround, can't you backup document.cookie, set it to the one you want, send the request, and then restore document.cookie?
AFAIK I can't set cookie for cross domain requests, and unfortunately this is my case.
Original issue reported on code.google.com by
GChovany...@gmail.com
on 2 Dec 2014 at 8:40The text was updated successfully, but these errors were encountered: