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

Side by Side Diff: pkg/http_server/lib/src/virtual_directory.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
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_directory;
6 6
7 import 'dart:async';
8 import 'dart:convert';
9 import 'dart:io';
10
11 import 'package:mime/mime.dart';
12 import 'package:path/path.dart';
7 13
8 // Used for signal a directory redirecting, where a tailing slash is missing. 14 // Used for signal a directory redirecting, where a tailing slash is missing.
9 class _DirectoryRedirect { 15 class _DirectoryRedirect {
10 const _DirectoryRedirect(); 16 const _DirectoryRedirect();
11 } 17 }
12 18
13 typedef dynamic _DirCallback(Directory dir, HttpRequest request); 19 typedef dynamic _DirCallback(Directory dir, HttpRequest request);
14 typedef dynamic _ErrorCallback(HttpRequest request); 20 typedef dynamic _ErrorCallback(HttpRequest request);
15 21
16 /** 22 /**
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 469
464 Future close() => new Future.value(); 470 Future close() => new Future.value();
465 471
466 void setMimeType(List<int> bytes) { 472 void setMimeType(List<int> bytes) {
467 var mimeType = lookupMimeType(path, headerBytes: bytes); 473 var mimeType = lookupMimeType(path, headerBytes: bytes);
468 if (mimeType != null) { 474 if (mimeType != null) {
469 response.headers.contentType = ContentType.parse(mimeType); 475 response.headers.contentType = ContentType.parse(mimeType);
470 } 476 }
471 } 477 }
472 } 478 }
OLDNEW
« no previous file with comments | « pkg/http_server/lib/src/http_multipart_form_data_impl.dart ('k') | pkg/http_server/lib/src/virtual_host.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698