Skip to content

Commit 0270528

Browse files
authored
CLDR-18837 Follow-up per comments in last-merged PR (#5024)
1 parent 688308f commit 0270528

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tools/cldr-apps/src/main/java/org/unicode/cldr/web/OutputFileManager.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,6 @@ private boolean outputAllFiles(VxmlGenerator vxmlGenerator, VxmlQueue.Results re
213213
}
214214

215215
public static Set<CLDRLocale> createVxmlLocaleSet() {
216-
if (false) { // Debugging only, to save time! Test with aa only
217-
Set<CLDRLocale> set = new TreeSet<>();
218-
set.add(CLDRLocale.getInstance("aa"));
219-
return set;
220-
}
221216
Set<CLDRLocale> set = new TreeSet<>(SurveyMain.getLocalesSet());
222217
// skip "en" and "root", since they should never be changed by the Survey Tool
223218
set.remove(CLDRLocale.getInstance("en"));

tools/cldr-apps/src/main/java/org/unicode/cldr/web/api/GenerateVxml.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
@Path("/vxml")
2121
@Tag(name = "Generate VXML", description = "APIs for Survey Tool VXML (Vetted XML) generation")
2222
public class GenerateVxml {
23+
24+
/**
25+
* Substitute for not-found MediaType.APPLICATION_ZIP. An alternative would be
26+
* MediaType.APPLICATION_OCTET_STREAM.
27+
*/
28+
private final String APPLICATION_ZIP = "application/zip";
29+
2330
@POST
2431
@Produces(MediaType.APPLICATION_JSON)
2532
@Operation(summary = "Generate VXML", description = "Generate VXML")
@@ -139,7 +146,7 @@ public static final class VxmlResponse {
139146

140147
@GET
141148
@Path("/download")
142-
@Produces(MediaType.APPLICATION_OCTET_STREAM)
149+
@Produces(APPLICATION_ZIP)
143150
@Operation(summary = "Download VXML", description = "Download VXML as zip file")
144151
@APIResponses(
145152
value = {
@@ -186,7 +193,7 @@ public Response downloadVxml(
186193
return Response.status(Response.Status.NOT_FOUND).build();
187194
}
188195
File zipFile = Zipper.zipDirectory(dir);
189-
return Response.ok(zipFile).header("Content-Type", "application/zip").build();
196+
return Response.ok(zipFile).header("Content-Type", APPLICATION_ZIP).build();
190197
} catch (Exception e) {
191198
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e).build();
192199
}

0 commit comments

Comments
 (0)