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

Side by Side Diff: pkg/http_server/lib/src/virtual_host.dart

Issue 756493002: pkg/http_server: move to multi-lib layout (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: readme fixup Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/http_server/lib/src/virtual_directory.dart ('k') | pkg/http_server/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of http_server; 5 library http_server.virtual_host;
6 6
7 import 'dart:async';
8 import 'dart:io';
7 9
8 /** 10 /**
9 * The [VirtualHost] class is a utility class for handling multiple hosts on 11 * The [VirtualHost] class is a utility class for handling multiple hosts on
10 * multiple sources, by using a named-based approach. 12 * multiple sources, by using a named-based approach.
11 */ 13 */
12 abstract class VirtualHost { 14 abstract class VirtualHost {
13 /** 15 /**
14 * Get the [Stream] of [HttpRequest]s, not matching any hosts. If unused, the 16 * Get the [Stream] of [HttpRequest]s, not matching any hosts. If unused, the
15 * default implementation will result in a [HttpHeaders.FORBIDDEN] response. 17 * default implementation will result in a [HttpHeaders.FORBIDDEN] response.
16 */ 18 */
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 142
141 void _unhandled(HttpRequest request) { 143 void _unhandled(HttpRequest request) {
142 if (_unhandledController != null) { 144 if (_unhandledController != null) {
143 _unhandledController.add(request); 145 _unhandledController.add(request);
144 return; 146 return;
145 } 147 }
146 request.response.statusCode = HttpStatus.FORBIDDEN; 148 request.response.statusCode = HttpStatus.FORBIDDEN;
147 request.response.close(); 149 request.response.close();
148 } 150 }
149 } 151 }
OLDNEW
« no previous file with comments | « pkg/http_server/lib/src/virtual_directory.dart ('k') | pkg/http_server/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698