| OLD | NEW |
| 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 dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 class _HttpHeaders implements HttpHeaders { | 7 class _HttpHeaders implements HttpHeaders { |
| 8 _HttpHeaders(String this.protocolVersion) | 8 _HttpHeaders(String this.protocolVersion) |
| 9 : _headers = new Map<String, List<String>>(); | 9 : _headers = new Map<String, List<String>>(); |
| 10 | 10 |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 } | 518 } |
| 519 | 519 |
| 520 String parseValue() { | 520 String parseValue() { |
| 521 int start = index; | 521 int start = index; |
| 522 while (!done()) { | 522 while (!done()) { |
| 523 if (s[index] == " " || | 523 if (s[index] == " " || |
| 524 s[index] == "\t" || | 524 s[index] == "\t" || |
| 525 s[index] == parameterSeparator) break; | 525 s[index] == parameterSeparator) break; |
| 526 index++; | 526 index++; |
| 527 } | 527 } |
| 528 return s.substring(start, index).toLowerCase(); | 528 return s.substring(start, index); |
| 529 } | 529 } |
| 530 | 530 |
| 531 void expect(String expected) { | 531 void expect(String expected) { |
| 532 if (done() || s[index] != expected) { | 532 if (done() || s[index] != expected) { |
| 533 throw new HttpException("Failed to parse header value"); | 533 throw new HttpException("Failed to parse header value"); |
| 534 } | 534 } |
| 535 index++; | 535 index++; |
| 536 } | 536 } |
| 537 | 537 |
| 538 void maybeExpect(String expected) { | 538 void maybeExpect(String expected) { |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 | 771 |
| 772 String name; | 772 String name; |
| 773 String value; | 773 String value; |
| 774 DateTime expires; | 774 DateTime expires; |
| 775 int maxAge; | 775 int maxAge; |
| 776 String domain; | 776 String domain; |
| 777 String path; | 777 String path; |
| 778 bool httpOnly = false; | 778 bool httpOnly = false; |
| 779 bool secure = false; | 779 bool secure = false; |
| 780 } | 780 } |
| OLD | NEW |