Project

General

Profile

Revision ac32d8ec

IDac32d8ec395f8a22d3c787092f25c54a70ec0b2c
Parent c683d6af
Child a4c9dfc9

Added by Andreas Kohlbecker over 3 years ago

fix #6382 proper handling of authentication in cdm_ws_progress.js

View differences:

cdmlib-remote-webapp/src/main/webapp/js/cdm_ws_progress.js
73 73
        isRunning = true;
74 74

  
75 75
        var url = $(this).attr('href');
76
        tokens = url.match(/(http:\/\/)(.*)(@)(.*$)/)
77
        login = null;
78
        if(tokens){
79
            login = tokens[2];
80
            url = tokens[1] + tokens[4];
81
        }
76 82
        $.ajax({
77 83
          url: addFileExtension(url, 'json'),
78 84
          dataType: "jsonp",
85
          beforeSend: function(xhr) { 
86
              if(login){
87
                  xhr.setRequestHeader("Authorization", "Basic " + btoa(login));                   
88
              }
89
          },
79 90
          success: function(data){
80 91
            monitorProgess(data);
81 92
          }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)