Index: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java |
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java |
index bc1631ccb62f75e036e15d9eb2b0889aed9abebd..d8f50fc8ff330679772a649e348c33ce6fd62a5c 100644 |
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java |
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java |
@@ -100,7 +100,7 @@ public final class CastCrashUploader { |
public void run() { |
// Multipart dump filename has format "[random string].dmp[pid]", e.g. |
// 20597a65-b822-008e-31f8fc8e-02bb45c0.dmp18169 |
- queueAllCrashDumpUpload(".*\\.dmp\\d+", null); |
+ queueAllCrashDumpUpload(".*\\.dmp\\d*", null); |
} |
}); |
} |
@@ -183,6 +183,12 @@ public final class CastCrashUploader { |
int statusCode = response.getStatusLine().getStatusCode(); |
if (statusCode != HttpStatus.SC_OK) { |
Log.e(TAG, "Failed response (" + statusCode + "): " + responseLine); |
+ |
+ // 400 Bad Request is returned if the dump file is malformed. Delete file |
+ // to prevent re-attempting later. |
+ if (statusCode == HttpStatus.SC_BAD_REQUEST) { |
+ dumpFile.delete(); |
+ } |
return; |
} |