Comment #16 on issue 8935 by freeman.mc: Gmail calendar widget doesn't load
http://code.google.com/p/chromium/issues/detail?id=8935

I have the same header problem writing a user script to export data from  
Google
Analytics and upload it directly to Google Docs.

Error
- Refused to set unsafe header "Authorization"
- Refused to set unsafe header "Content-length"

Here is part of the code

function upload2GDocs(authToken, content){
     //function used to upload the content to GDocs
     var gdocURL = 'http://docs.google.com/feeds/documents/private/full';
        authToken = authToken.toString();
     if (authToken.length > 1) {
     var xhr3 = new XMLHttpRequest();
        xhr3.open("POST", gdocURL, true);
        //Send the proper header information along with the request
        xhr3.setRequestHeader('Content-type', 'text/tab-separated-values');
        xhr3.setRequestHeader('Content-length', content.length);
        xhr3.setRequestHeader('Slug', download_report_ref);
        xhr3.setRequestHeader('Authorization', 'GoogleLogin ' + authToken);


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to