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

Side by Side Diff: lib/shelf_proxy.dart

Issue 1577273004: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/shelf_proxy.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | lib/src/utils.dart » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library shelf_proxy;
6
7 import 'package:http/http.dart' as http; 5 import 'package:http/http.dart' as http;
8 import 'package:path/path.dart' as p; 6 import 'package:path/path.dart' as p;
9 import 'package:shelf/shelf.dart'; 7 import 'package:shelf/shelf.dart';
10 8
11 import 'src/utils.dart'; 9 import 'src/utils.dart';
12 10
13 /// A handler that proxies requests to [url]. 11 /// A handler that proxies requests to [url].
14 /// 12 ///
15 /// To generate the proxy request, this concatenates [url] and [Request.url]. 13 /// To generate the proxy request, this concatenates [url] and [Request.url].
16 /// This means that if the handler mounted under `/documentation` and [url] is 14 /// This means that if the handler mounted under `/documentation` and [url] is
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // TODO(nweiz): use built-in methods for this when http and shelf support them. 92 // TODO(nweiz): use built-in methods for this when http and shelf support them.
95 /// Add a header with [name] and [value] to [headers], handling existing headers 93 /// Add a header with [name] and [value] to [headers], handling existing headers
96 /// gracefully. 94 /// gracefully.
97 void _addHeader(Map<String, String> headers, String name, String value) { 95 void _addHeader(Map<String, String> headers, String name, String value) {
98 if (headers.containsKey(name)) { 96 if (headers.containsKey(name)) {
99 headers[name] += ', $value'; 97 headers[name] += ', $value';
100 } else { 98 } else {
101 headers[name] = value; 99 headers[name] = value;
102 } 100 }
103 } 101 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698