Skip to content

refactor(storage): drop direct http_parser dependency - #1570

Merged
spydon merged 1 commit into
mainfrom
refactor/storage-drop-http-parser
Jul 9, 2026
Merged

spydon merged 1 commit into
mainfrom
refactor/storage-drop-http-parser

Conversation

@spydon

@spydon spydon commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

Removes the direct http_parser dependency from storage_client.

MediaType was the only symbol used from http_parser (in fetch.dart). Since http 1.6.0, package:http re-exports MediaType:

export 'package:http_parser/http_parser.dart' show MediaType;

The direct import was already flagged // ignore: unnecessary_import — needed for http < 1.6.0 which doesn't re-export MediaType. As the package now requires http: ^1.6.0, that compatibility shim is obsolete: MediaType resolves through the existing package:http/http.dart import.

Why

One fewer direct dependency to track, with zero in-house code and no behavior change.

Testing

dart analyze clean; storage_client mime/content-type tests pass.

MediaType was the only symbol used from http_parser, and http >=1.6.0
re-exports it. The direct dependency and import were only kept for
http < 1.6.0 compatibility, which is no longer supported (http: ^1.6.0
is the floor).
@spydon
spydon requested a review from a team as a code owner July 9, 2026 10:02
@github-actions github-actions Bot added the storage This issue or pull request is related to storage label Jul 9, 2026
@spydon
spydon merged commit 6dadaef into main Jul 9, 2026
28 checks passed
@spydon
spydon deleted the refactor/storage-drop-http-parser branch July 9, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage This issue or pull request is related to storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants