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

Unified Diff: runtime/bin/vmservice/server.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 | « no previous file | runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/server.dart
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
index e1cb822f6afd0cfab29a8c26006578aea2dd4433..32ee7d6d24c0c06009b9d6e165b120765d6d477e 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -190,15 +190,23 @@ class Server {
List fsNameList;
List fsPathList;
+ List fsPathBase64List;
Object fsName;
Object fsPath;
try {
// Extract the fs name and fs path from the request headers.
fsNameList = request.headers['dev_fs_name'];
- fsPathList = request.headers['dev_fs_path'];
fsName = fsNameList[0];
- fsPath = fsPathList[0];
+
+ fsPathList = request.headers['dev_fs_path'];
+ fsPathBase64List = request.headers['dev_fs_path_b64'];
+ // If the 'dev_fs_path_b64' header field was sent, use that instead.
+ if ((fsPathBase64List != null) && (fsPathBase64List.length > 0)) {
+ fsPath = UTF8.decode(BASE64.decode(fsPathBase64List[0]));
+ } else {
+ fsPath = fsPathList[0];
+ }
} catch (e) { /* ignore */ }
String result;
« no previous file with comments | « no previous file | runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698