We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45698bf commit a6c9fb2Copy full SHA for a6c9fb2
src/net/app_protocol_handler.cc
@@ -22,7 +22,13 @@ AppProtocolHandler::AppProtocolHandler(const base::FilePath& root)
22
URLRequestJob* AppProtocolHandler::MaybeCreateJob(
23
URLRequest* request, NetworkDelegate* network_delegate) const {
24
base::FilePath file_path;
25
- const bool is_file = FileURLToFilePath(request->url(), &file_path);
+ GURL url(request->url());
26
+ url_canon::Replacements<char> replacements;
27
+ replacements.SetScheme("file", url_parse::Component(0, 4));
28
+ replacements.ClearHost();
29
+ url = url.ReplaceComponents(replacements);
30
+
31
+ const bool is_file = FileURLToFilePath(url, &file_path);
32
33
file_path = root_path_.Append(file_path);
34
// Check file access permissions.
0 commit comments