Commit e72e1744 authored by John McCutchan's avatar John McCutchan Committed by GitHub

Encode DevFS filenames so they are safe for http headers (#6428)

parent 27ed4600
......@@ -225,7 +225,8 @@ class _DevFSHttpWriter {
HttpClientRequest request = await _client.putUrl(httpAddress);
request.headers.removeAll(HttpHeaders.ACCEPT_ENCODING);
request.headers.add('dev_fs_name', fsName);
request.headers.add('dev_fs_path', entry.devicePath);
request.headers.add('dev_fs_path_b64',
BASE64.encode(UTF8.encode(entry.devicePath)));
Stream<List<int>> contents = entry.contentsAsCompressedStream();
await request.addStream(contents);
HttpClientResponse response = await request.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment