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

Side by Side Diff: runtime/bin/http_impl.dart

Issue 9834043: Fix HTTP library issues reported by dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/http_parser.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class _HttpRequestResponseBase { 5 class _HttpRequestResponseBase {
6 _HttpRequestResponseBase(_HttpConnectionBase this._httpConnection) 6 _HttpRequestResponseBase(_HttpConnectionBase this._httpConnection)
7 : _contentLength = -1, 7 : _contentLength = -1,
8 _keepAlive = false, 8 _keepAlive = false,
9 _headers = new Map(); 9 _headers = new Map();
10 10
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (_state != DONE) { 287 if (_state != DONE) {
288 _httpConnection.outputStream.onNoPendingWrites = callback; 288 _httpConnection.outputStream.onNoPendingWrites = callback;
289 } 289 }
290 } 290 }
291 291
292 void _streamSetCloseHandler(callback()) { 292 void _streamSetCloseHandler(callback()) {
293 // TODO(sgjesse): Handle this. 293 // TODO(sgjesse): Handle this.
294 } 294 }
295 295
296 void _streamSetErrorHandler(callback(Exception e)) { 296 void _streamSetErrorHandler(callback(Exception e)) {
297 _streamErrorHandler = callback 297 _streamErrorHandler = callback;
298 } 298 }
299 299
300 String _findReasonPhrase(int statusCode) { 300 String _findReasonPhrase(int statusCode) {
301 if (_reasonPhrase != null) { 301 if (_reasonPhrase != null) {
302 return _reasonPhrase; 302 return _reasonPhrase;
303 } 303 }
304 304
305 switch (statusCode) { 305 switch (statusCode) {
306 case HttpStatus.CONTINUE: return "Continue"; 306 case HttpStatus.CONTINUE: return "Continue";
307 case HttpStatus.SWITCHING_PROTOCOLS: return "Switching Protocols"; 307 case HttpStatus.SWITCHING_PROTOCOLS: return "Switching Protocols";
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 sockets.addFirst(socketConn); 1197 sockets.addFirst(socketConn);
1198 socketConn._markReturned(); 1198 socketConn._markReturned();
1199 } 1199 }
1200 1200
1201 Function _onOpen; 1201 Function _onOpen;
1202 Map<String, Queue<_SocketConnection>> _openSockets; 1202 Map<String, Queue<_SocketConnection>> _openSockets;
1203 Set<_SocketConnection> _activeSockets; 1203 Set<_SocketConnection> _activeSockets;
1204 Timer _evictionTimer; 1204 Timer _evictionTimer;
1205 bool _shutdown; // Has this HTTP client been shutdown? 1205 bool _shutdown; // Has this HTTP client been shutdown?
1206 } 1206 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698