Skip to content

Commit

Permalink
V1.8
Browse files Browse the repository at this point in the history
Fix crash
Fix spelling
fixes #52
fixes #51
  • Loading branch information
woheller69 committed Aug 13, 2024
1 parent 16fd67e commit 6c645b3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 27 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.woheller69.TimeLapseCam"
minSdk 23
targetSdk 34
versionCode 17
versionName "1.7"
versionCode 18
versionName "1.8"

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,36 +104,39 @@ private void processRequest() throws IOException {
BufferedReader reader = new BufferedReader(isr);

String request = reader.readLine();
int pos = request.indexOf(' ');
if (pos == -1) {
Log.e(TAG, "Invalid Request: «" + request + "»");
}
String method = request.substring(0, pos);
int pos2 = request.indexOf(' ', pos + 1);
if (pos2 == -1) {
Log.e(TAG, "Invalid Request: «" + request + "»");
}
String url = request.substring(pos + 1, pos2);
String protocol = request.substring(pos2);

Log.d(TAG, "Request: «" + method + "» «" + url + "» «" + protocol + "»");

String line = reader.readLine();
Map<String, String> header = new HashMap<>();
while (!line.isEmpty()) {
pos = line.indexOf(':');
if (request != null) {
int pos = request.indexOf(' ');
if (pos == -1) {
continue;
Log.e(TAG, "Invalid Request: «" + request + "»");
}
String method = request.substring(0, pos);
int pos2 = request.indexOf(' ', pos + 1);
if (pos2 == -1) {
Log.e(TAG, "Invalid Request: «" + request + "»");
}
String url = request.substring(pos + 1, pos2);
String protocol = request.substring(pos2);

String key = line.substring(0, pos);
String value = line.substring(pos + 1);
header.put(key, value);
Log.d(TAG, "Request: «" + method + "» «" + url + "» «" + protocol + "»");

String line = reader.readLine();
Map<String, String> header = new HashMap<>();
while (line != null && !line.isEmpty()) {
pos = line.indexOf(':');
if (pos == -1) {
continue;
}

String key = line.substring(0, pos);
String value = line.substring(pos + 1);
header.put(key, value);

line = reader.readLine();
}

line = reader.readLine();
processRequest(method, url, protocol, header);
}

processRequest(method, url, protocol, header);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public boolean output(String listFolder) throws IOException {
@Override
protected void writeHeader() throws IOException {
out.sendReplyHeader(ReplyCode.FOUND, "text/html");
out.sendLine("<html><head><title>TimeLapsCam</title></head><body>");
out.sendLine("<html><head><title>TimeLapseCam</title></head><body>");
out.sendLine("<h1>List folder</h1>");
}

Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/de-DE/changelogs/18.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fehlerbehebung
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/18.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bugfix

0 comments on commit 6c645b3

Please sign in to comment.