Project

General

Profile

Revision fcfd1e30

IDfcfd1e30ae194d17b3be1bae4b5f09dcbb52eaa0
Parent 1b7ce0af
Child 733faa22

Added by Andreas Kohlbecker almost 4 years ago

fix #6339 fixing missing respect to the frontendBaseUrl

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/util/ProgressMonitorUtil.java
55 55
        response.setHeader("Location", monitorPath);
56 56
        boolean isJSONP = request.getParameter("callback") != null;
57 57

  
58
        JsonpRedirect jsonpRedirect;
59
        if(frontendBaseUrl != null){
60
            jsonpRedirect = new JsonpRedirect(frontendBaseUrl, monitorPath);
61
        } else {
62
            jsonpRedirect = new JsonpRedirect(request, monitorPath);
63
        }
58 64

  
59
            if(isJSONP){
60
                JsonpRedirect jsonpRedirect;
61
                if(frontendBaseUrl != null){
62
                    jsonpRedirect = new JsonpRedirect(frontendBaseUrl, monitorPath);
63
                } else {
64
                    jsonpRedirect = new JsonpRedirect(request, monitorPath);
65
                }
66
                mv.addObject(jsonpRedirect);
65
        if(isJSONP){
66
            mv.addObject(jsonpRedirect);
67 67

  
68
            } else {
69
                RedirectView redirectView = new RedirectView(monitorPath);
70
                mv.setView(redirectView);
71
            }
68
        } else {
69
            RedirectView redirectView = new RedirectView(jsonpRedirect.getRedirectURL());
70
            mv.setView(redirectView);
71
        }
72 72

  
73 73
        return mv;
74 74
    }
......
95 95

  
96 96
        if(monitor.isDone() && !monitor.isCanceled() && !monitor.isFailed()){
97 97
            if(downloadUrl != null){
98
                response.setHeader("Loaction", downloadUrl);
98
                response.setHeader("Location", downloadUrl);
99 99
                RedirectView redirectView = new RedirectView(downloadUrl);
100 100
                mv.setView(redirectView);
101 101
                return mv;
......
103 103
        }else{
104 104

  
105 105
            response.setHeader("Location", monitorPath);
106

  
107
            JsonpRedirect jsonpRedirect;
108
            if(frontendBaseUrl != null){
109
                jsonpRedirect = new JsonpRedirect(frontendBaseUrl, monitorPath);
110
            } else {
111
                jsonpRedirect = new JsonpRedirect(request, monitorPath);
112
            }
113

  
106 114
            boolean isJSONP = request.getParameter("callback") != null;
107 115
            if(isJSONP){
108
                JsonpRedirect jsonpRedirect;
109
                if(frontendBaseUrl != null){
110
                    jsonpRedirect = new JsonpRedirect(frontendBaseUrl, monitorPath);
111
                } else {
112
                    jsonpRedirect = new JsonpRedirect(request, monitorPath);
113
                }
114 116
                mv.addObject(jsonpRedirect);
115

  
116 117
            } else {
117
                RedirectView redirectView = new RedirectView(monitorPath);
118
                RedirectView redirectView = new RedirectView(jsonpRedirect.getRedirectURL());
118 119
                mv.setView(redirectView);
119 120
            }
120 121
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)