Skip to content

Commit 45bbee6

Browse files
committed
Fixing token spend, embed base64 in html response, subscribers by app, and more.
1 parent 87d9fa5 commit 45bbee6

30 files changed

+150
-90
lines changed

config/apptest/subscribers.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"ips": [],
1111
"keys": [
1212
"appTest"
13-
]
13+
],
14+
"apps": []
1415
},
1516
{
1617
"customer": "BarcodeAPI.org",
@@ -22,7 +23,8 @@
2223
"ips": [
2324
"127.0.0.1"
2425
],
25-
"keys": []
26+
"keys": [],
27+
"apps": []
2628
}
2729
]
28-
}
30+
}

config/types/AprilTag.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"checkdigit": 0,
1919
"nonprinting": false,
2020
"example": [
21-
"tag36h11:0"
21+
"tag36h11:0",
22+
"tag16h5:0"
2223
],
2324
"pattern": {
2425
"auto": "^tag.*:[0-9]{1,5}$",

config/types/EAN13.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"checkdigit": 13,
2020
"nonprinting": false,
2121
"example": [
22-
"1234567890128"
22+
"1234567890128",
23+
"1123332122321+11252"
2324
],
2425
"pattern": {
2526
"auto": "^[0-9]{13}$",

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<dependency>
117117
<groupId>com.mclarkdev.tools</groupId>
118118
<artifactId>liblog</artifactId>
119-
<version>1.6.6</version>
119+
<version>1.6.7</version>
120120
</dependency>
121121

122122
<dependency>

src/main/java/org/barcodeapi/server/admin/CacheDumpHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected void onRequest(RequestContext c, HttpServletResponse r) throws JSONExc
5353

5454
// Print response to client
5555
r.setStatus(HttpServletResponse.SC_OK);
56-
r.setHeader("Content-Type", "application/json");
56+
r.setContentType("application/json");
5757
r.setHeader("Content-Disposition", "attachment, filename=cache.json");
5858
r.getOutputStream().println((new JSONObject()//
5959
.put("code", 200)//

src/main/java/org/barcodeapi/server/admin/CacheFlushHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected void onRequest(RequestContext c, HttpServletResponse r) throws JSONExc
3636

3737
// Print response to client
3838
r.setStatus(HttpServletResponse.SC_OK);
39-
r.setHeader("Content-Type", "application/json");
39+
r.setContentType("application/json");
4040
r.getOutputStream().println((new JSONObject()//
4141
.put("code", 200)//
4242
.put("message", "caches flushed")//

src/main/java/org/barcodeapi/server/admin/LimiterFlushHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected void onRequest(RequestContext c, HttpServletResponse r) throws JSONExc
3232

3333
// Print failure to client
3434
r.setStatus(HttpServletResponse.SC_BAD_REQUEST);
35-
r.setHeader("Content-Type", "application/json");
35+
r.setContentType("application/json");
3636
r.getOutputStream().println((new JSONObject()//
3737
.put("code", 400)//
3838
.put("message", "limiter not found")//
@@ -42,7 +42,7 @@ protected void onRequest(RequestContext c, HttpServletResponse r) throws JSONExc
4242

4343
// Print response to client
4444
r.setStatus(HttpServletResponse.SC_OK);
45-
r.setHeader("Content-Type", "application/json");
45+
r.setContentType("application/json");
4646
r.getOutputStream().println((new JSONObject()//
4747
.put("code", 200)//
4848
.put("message", "limiter flushed")//

src/main/java/org/barcodeapi/server/admin/LimiterListHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected void onRequest(RequestContext c, HttpServletResponse r) throws JSONExc
3737

3838
// Print response to client
3939
r.setStatus(HttpServletResponse.SC_OK);
40-
r.setHeader("Content-Type", "application/json");
40+
r.setContentType("application/json");
4141
r.getOutputStream().println((new JSONObject()//
4242
.put("limiters", byKey)//
4343
).toString());

src/main/java/org/barcodeapi/server/admin/ServerStatsHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected void onRequest(RequestContext c, HttpServletResponse r) throws JSONExc
3434

3535
// Print response to client
3636
r.setStatus(HttpServletResponse.SC_OK);
37-
r.setHeader("Content-Type", "application/json");
37+
r.setContentType("application/json");
3838
r.getOutputStream().println(stats.toString());
3939
}
4040
}

src/main/java/org/barcodeapi/server/admin/SessionFlushHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected void onRequest(RequestContext c, HttpServletResponse r) throws JSONExc
3030

3131
// Print response to client
3232
r.setStatus(HttpServletResponse.SC_OK);
33-
r.setHeader("Content-Type", "application/json");
33+
r.setContentType("application/json");
3434
r.getOutputStream().println((new JSONObject()//
3535
.put("message", "sessions flushed")//
3636
.put("count", count)//

0 commit comments

Comments
 (0)