Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Prepare release v4.1.0 (#100)
Browse files Browse the repository at this point in the history
* Also make private _State class an enum
* minor bump with new features
  • Loading branch information
kevmoo authored Jun 17, 2024
1 parent 71b4c2c commit 9bf7bd9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
8 changes: 3 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
## 4.0.3-wip
## 4.1.0

* `CaseInsensitiveMap`: added constructor `fromEntries`.

* Require Dart 3.4

* collection: ^1.19.0
* Require `package:collection` `^1.19.0`
* Require Dart `^3.4.0`

## 4.0.2

Expand Down
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://dart.dev/guides/language/analysis-options
# https://dart.dev/tools/analysis#the-analysis-options-file
include: package:dart_flutter_team_lints/analysis_options.yaml

analyzer:
Expand Down
28 changes: 14 additions & 14 deletions lib/src/chunked_coding/decoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,63 +173,63 @@ class _Sink extends ByteConversionSinkBase {

/// An enumeration of states that [_Sink] can exist in when decoded a chunked
/// message.
class _State {
enum _State {
/// The parser has fully parsed one chunk and is expecting the header for the
/// next chunk.
///
/// Transitions to [size].
static const boundary = _State._('boundary');
boundary('boundary'),

/// The parser has parsed at least one digit of the chunk size header, but has
/// not yet parsed the `CR LF` sequence that indicates the end of that header.
///
/// Transitions to [sizeBeforeLF].
static const size = _State._('size');
size('size'),

/// The parser has parsed the chunk size header and the CR character after it,
/// but not the LF.
///
/// Transitions to [body] or [bodyBeforeCR].
static const sizeBeforeLF = _State._('size before LF');
sizeBeforeLF('size before LF'),

/// The parser has parsed a chunk header and possibly some of the body, but
/// still needs to consume more bytes.
///
/// Transitions to [bodyBeforeCR].
static const body = _State._('body');
body('body'),

// The parser has parsed all the bytes in a chunk body but not the CR LF
// sequence that follows it.
//
// Transitions to [bodyBeforeLF].
static const bodyBeforeCR = _State._('body before CR');
bodyBeforeCR('body before CR'),

// The parser has parsed all the bytes in a chunk body and the CR that follows
// it, but not the LF after that.

This comment has been minimized.

Copy link
@Miguel792383

Miguel792383 Oct 21, 2024

in flutter

//
// Transitions to [bounday].
static const bodyBeforeLF = _State._('body before LF');
// Transitions to [boundary].
bodyBeforeLF('body before LF'),

/// The parser has parsed the final empty chunk but not the CR LF sequence
/// that follows it.
///
/// Transitions to [endBeforeLF].
static const endBeforeCR = _State._('end before CR');
endBeforeCR('end before CR'),

/// The parser has parsed the final empty chunk and the CR that follows it,
/// but not the LF after that.
///
/// Transitions to [end].
static const endBeforeLF = _State._('end before LF');
endBeforeLF('end before LF'),

/// The parser has parsed the final empty chunk as well as the CR LF that
/// follows, and expects no more data.
static const end = _State._('end');
end('end');

final String _name;
const _State(this.name);

const _State._(this._name);
final String name;

@override
String toString() => _name;
String toString() => name;
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: http_parser
version: 4.0.3-wip
version: 4.1.0
description: >-
A platform-independent package for parsing and serializing HTTP formats.
repository: https://github.com/dart-lang/http_parser
Expand Down

0 comments on commit 9bf7bd9

Please sign in to comment.