Skip to content

Commit

Permalink
Add some debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ksclarke committed Dec 21, 2024
1 parent 663b3c7 commit 5887e08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/info/freelibrary/iiif/webrepl/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static info.freelibrary.util.Constants.EMPTY;
import static info.freelibrary.util.Constants.EOL;
import static info.freelibrary.util.Constants.INADDR_ANY;
import static info.freelibrary.util.Constants.SPACE;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.BufferedReader;
Expand Down Expand Up @@ -200,12 +201,15 @@ public void handle(final Request aRequest, final Consumer<Response> aCallback) {
final String uri = aRequest.uri();
final Response response;

System.err.println(aRequest.method() + SPACE + uri);

switch (aRequest.method()) {
case "POST" -> {
if (uri.endsWith("submit") || uri.endsWith("submit/")) {
final StringBuilder submission = new StringBuilder();

submission.append(decodeSubmission(aRequest.body()));
System.err.println("body: " + submission.toString());

try {
myShell.eval(getCode(submission.toString().trim())).forEach(event -> {
Expand Down

0 comments on commit 5887e08

Please sign in to comment.