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

Unified Diff: pkg/http_server/test/utils.dart

Issue 18333003: Correctly url-decode the path segment in the http_server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't allow invalid characters in segment. Created 7 years, 6 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 | « pkg/http_server/lib/src/virtual_directory.dart ('k') | pkg/http_server/test/virtual_directory_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http_server/test/utils.dart
diff --git a/pkg/http_server/test/utils.dart b/pkg/http_server/test/utils.dart
index fb8e037c2ba2b3cf2206de249488aa2e0d06eebc..498d159b8cdbf86ebb32671cd3e2a413d97d704f 100644
--- a/pkg/http_server/test/utils.dart
+++ b/pkg/http_server/test/utils.dart
@@ -12,10 +12,19 @@ Future<int> getStatusCode(int port,
String path,
{String host,
bool secure: false,
- DateTime ifModifiedSince}) {
- var uri = (secure ?
- new Uri.https('localhost:$port', path) :
- new Uri.http('localhost:$port', path));
+ DateTime ifModifiedSince,
+ bool rawPath: false}) {
+ var uri;
+ if (rawPath) {
+ uri = new Uri(scheme: secure ? 'https' : 'http',
+ host: 'localhost',
+ port: port,
+ path: path);
+ } else {
+ uri = (secure ?
+ new Uri.https('localhost:$port', path) :
+ new Uri.http('localhost:$port', path));
+ }
return new HttpClient().getUrl(uri)
.then((request) {
if (host != null) request.headers.host = host;
« no previous file with comments | « pkg/http_server/lib/src/virtual_directory.dart ('k') | pkg/http_server/test/virtual_directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698