Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart

Issue 2386123005: Support paths which are encoded with base64 in http put devfs server code (Closed)
Patch Set: status file update Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart
diff --git a/runtime/observatory/tests/service/dev_fs_http_put_test.dart b/runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart
similarity index 92%
copy from runtime/observatory/tests/service/dev_fs_http_put_test.dart
copy to runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart
index c5639a808c1cab590b2fd321ebe82bb932526ce3..517a83261eea841c0f95e7b74261dbdc8b7ddbb1 100644
--- a/runtime/observatory/tests/service/dev_fs_http_put_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart
@@ -21,10 +21,11 @@ Future<String> readResponse(HttpClientResponse response) {
var tests = [
- // Write a file with the ? character in the filename.
+ // Write a file with the \r character in the filename.
(VM vm) async {
var fsId = 'test';
- var filePath = '/foo/bar.dat';
+ var filePath = '/foo/b\rar.dart';
+ var filePathBase64 = BASE64.encode(UTF8.encode(filePath));
var fileContents = [0, 1, 2, 3, 4, 5, 6, 255];
var fileContentsBase64 = BASE64.encode(fileContents);
@@ -40,7 +41,7 @@ var tests = [
HttpClientRequest request =
await client.putUrl(Uri.parse(serviceHttpAddress));
request.headers.add('dev_fs_name', fsId);
- request.headers.add('dev_fs_path', filePath);
+ request.headers.add('dev_fs_path_b64', filePathBase64);
request.add(GZIP.encode([9]));
HttpClientResponse response = await request.close();
String responseBody = await readResponse(response);
@@ -64,7 +65,7 @@ var tests = [
request =
await client.putUrl(Uri.parse(serviceHttpAddress));
request.headers.add('dev_fs_name', fsId);
- request.headers.add('dev_fs_path', filePath);
+ request.headers.add('dev_fs_path_b64', filePathBase64);
request.add(GZIP.encode(fileContents));
response = await request.close();
responseBody = await readResponse(response);
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698