Revision ea94470a
b/src/gr/grnet/pithos/web/client/FilePropertiesDialog.java | ||
---|---|---|
52 | 52 |
import com.google.gwt.event.dom.client.ClickEvent; |
53 | 53 |
import com.google.gwt.event.dom.client.ClickHandler; |
54 | 54 |
import com.google.gwt.http.client.Response; |
55 |
import com.google.gwt.http.client.URL; |
|
55 | 56 |
import com.google.gwt.i18n.client.DateTimeFormat; |
56 | 57 |
import com.google.gwt.resources.client.ImageResource; |
57 | 58 |
import com.google.gwt.user.client.Window; |
... | ... | |
447 | 448 |
} |
448 | 449 |
}; |
449 | 450 |
updateFile.setHeader("X-Auth-Token", app.getToken()); |
451 |
for (String t : file.getTags()) { |
|
452 |
updateFile.setHeader("X-Object-Meta-" + URL.encodePathSegment(t.trim()), "~"); |
|
453 |
} |
|
450 | 454 |
if (newTags != null) |
451 | 455 |
for (String t : newTags) |
452 | 456 |
if (t.length() > 0) |
453 |
updateFile.setHeader("X-Object-Meta-" + t.trim(), "true"); |
|
454 |
for (String t : file.getTags()) |
|
455 |
updateFile.setHeader("X-Object-Meta-" + t.trim(), "~"); |
|
457 |
updateFile.setHeader("X-Object-Meta-" + URL.encodePathSegment(t.trim()), "true"); |
|
456 | 458 |
if (published != null) |
457 | 459 |
updateFile.setHeader("X-Object-Public", published.toString()); |
458 | 460 |
if (newPermissions != null) { |
b/src/gr/grnet/pithos/web/client/commands/AddUserCommand.java | ||
---|---|---|
43 | 43 |
import com.google.gwt.core.client.GWT; |
44 | 44 |
import com.google.gwt.core.client.Scheduler; |
45 | 45 |
import com.google.gwt.http.client.Response; |
46 |
import com.google.gwt.http.client.URL; |
|
46 | 47 |
import com.google.gwt.user.client.Command; |
47 | 48 |
import com.google.gwt.user.client.Window; |
48 | 49 |
import com.google.gwt.user.client.ui.PopupPanel; |
... | ... | |
101 | 102 |
String groupMembers = ""; |
102 | 103 |
for (String u : group.getMembers()) |
103 | 104 |
groupMembers += (u + ","); |
104 |
updateGroup.setHeader("X-Account-Group-" + group.getName(), groupMembers);
|
|
105 |
updateGroup.setHeader("X-Account-Group-" + URL.encodePathSegment(group.getName()), groupMembers);
|
|
105 | 106 |
Scheduler.get().scheduleDeferred(updateGroup); |
106 | 107 |
} |
107 | 108 |
} |
b/src/gr/grnet/pithos/web/client/commands/DeleteGroupCommand.java | ||
---|---|---|
43 | 43 |
import com.google.gwt.core.client.GWT; |
44 | 44 |
import com.google.gwt.core.client.Scheduler; |
45 | 45 |
import com.google.gwt.http.client.Response; |
46 |
import com.google.gwt.http.client.URL; |
|
46 | 47 |
import com.google.gwt.user.client.Command; |
47 | 48 |
import com.google.gwt.user.client.Window; |
48 | 49 |
import com.google.gwt.user.client.ui.PopupPanel; |
... | ... | |
97 | 98 |
} |
98 | 99 |
}; |
99 | 100 |
updateGroup.setHeader("X-Auth-Token", app.getToken()); |
100 |
updateGroup.setHeader("X-Account-Group-" + group.getName(), "~");
|
|
101 |
updateGroup.setHeader("X-Account-Group-" + URL.encodePathSegment(group.getName()), "~");
|
|
101 | 102 |
Scheduler.get().scheduleDeferred(updateGroup); |
102 | 103 |
} |
103 | 104 |
} |
b/src/gr/grnet/pithos/web/client/commands/RemoveUserCommand.java | ||
---|---|---|
44 | 44 |
import com.google.gwt.core.client.GWT; |
45 | 45 |
import com.google.gwt.core.client.Scheduler; |
46 | 46 |
import com.google.gwt.http.client.Response; |
47 |
import com.google.gwt.http.client.URL; |
|
47 | 48 |
import com.google.gwt.user.client.Command; |
48 | 49 |
import com.google.gwt.user.client.ui.PopupPanel; |
49 | 50 |
|
... | ... | |
104 | 105 |
} |
105 | 106 |
else |
106 | 107 |
groupMembers = "~"; |
107 |
updateGroup.setHeader("X-Account-Group-" + group.getName(), groupMembers);
|
|
108 |
updateGroup.setHeader("X-Account-Group-" + URL.encodePathSegment(group.getName()), groupMembers);
|
|
108 | 109 |
Scheduler.get().scheduleDeferred(updateGroup); |
109 | 110 |
} |
110 | 111 |
} |
b/src/gr/grnet/pithos/web/client/foldertree/AccountResource.java | ||
---|---|---|
44 | 44 |
|
45 | 45 |
import com.google.gwt.http.client.Header; |
46 | 46 |
import com.google.gwt.http.client.Response; |
47 |
import com.google.gwt.http.client.URL; |
|
47 | 48 |
import com.google.gwt.i18n.client.DateTimeFormat; |
48 | 49 |
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; |
49 | 50 |
import com.google.gwt.i18n.client.NumberFormat; |
... | ... | |
143 | 144 |
if (h != null) { |
144 | 145 |
String name = h.getName(); |
145 | 146 |
if (name.startsWith("X-Account-Group-")) { |
146 |
String groupName = name.substring("X-Account-Group-".length()).trim().toLowerCase();
|
|
147 |
String groupName = URL.decodePathSegment(name.substring("X-Account-Group-".length())).trim().toLowerCase();
|
|
147 | 148 |
Group g = new Group(groupName); |
148 | 149 |
String[] members = h.getValue().split(","); |
149 | 150 |
for (String s : members) |
b/src/gr/grnet/pithos/web/client/foldertree/File.java | ||
---|---|---|
43 | 43 |
|
44 | 44 |
import com.google.gwt.http.client.Header; |
45 | 45 |
import com.google.gwt.http.client.Response; |
46 |
import com.google.gwt.http.client.URL; |
|
46 | 47 |
import com.google.gwt.i18n.client.NumberFormat; |
47 | 48 |
import com.google.gwt.json.client.JSONObject; |
48 | 49 |
|
... | ... | |
167 | 168 |
|
168 | 169 |
for (String key : o.keySet()) |
169 | 170 |
if (key.startsWith("x_object_meta_")) |
170 |
tags.add(key.substring("x_object_meta_".length()).trim().toLowerCase());
|
|
171 |
tags.add(URL.decodePathSegment(key.substring("x_object_meta_".length())).trim().toLowerCase());
|
|
171 | 172 |
|
172 | 173 |
|
173 | 174 |
} |
... | ... | |
223 | 224 |
for (Header h : response.getHeaders()) { |
224 | 225 |
String header = h.getName(); |
225 | 226 |
if (header.startsWith("X-Object-Meta-")) |
226 |
tags.add(header.substring("X-Object-Meta-".length()).trim().toLowerCase());
|
|
227 |
tags.add(URL.decodePathSegment(header.substring("X-Object-Meta-".length())).trim().toLowerCase());
|
|
227 | 228 |
else if (header.equals("X-Object-Sharing")) { |
228 | 229 |
String rawPermissions = h.getValue(); |
229 | 230 |
parsePermissions(rawPermissions); |
b/src/gr/grnet/pithos/web/client/foldertree/Folder.java | ||
---|---|---|
45 | 45 |
|
46 | 46 |
import com.google.gwt.core.client.GWT; |
47 | 47 |
import com.google.gwt.http.client.Response; |
48 |
import com.google.gwt.http.client.URL; |
|
48 | 49 |
import com.google.gwt.i18n.client.DateTimeFormat; |
49 | 50 |
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; |
50 | 51 |
import com.google.gwt.json.client.JSONArray; |
... | ... | |
163 | 164 |
header = response.getHeader("X-Container-Object-Meta"); |
164 | 165 |
if (header != null && header.length() > 0) { |
165 | 166 |
for (String t : header.split(",")) { |
166 |
tags.add(t.toLowerCase().trim());
|
|
167 |
tags.add(URL.decodePathSegment(t.toLowerCase()).trim());
|
|
167 | 168 |
} |
168 | 169 |
} |
169 | 170 |
|
b/src/gr/grnet/pithos/web/client/rest/PostRequest.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
package gr.grnet.pithos.web.client.rest; |
37 | 37 |
|
38 |
import com.google.gwt.core.client.GWT; |
|
38 | 39 |
import com.google.gwt.core.client.Scheduler.ScheduledCommand; |
39 | 40 |
import com.google.gwt.http.client.Request; |
40 | 41 |
import com.google.gwt.http.client.RequestBuilder; |
... | ... | |
105 | 106 |
}); |
106 | 107 |
} |
107 | 108 |
catch (RequestException e) { |
109 |
GWT.log("", e); |
|
108 | 110 |
} |
109 | 111 |
} |
110 | 112 |
|
Also available in: Unified diff