diff --git a/lib/src/command/lish.dart b/lib/src/command/lish.dart index cceee423b..3f4401581 100644 --- a/lib/src/command/lish.dart +++ b/lib/src/command/lish.dart @@ -5,6 +5,7 @@ import 'dart:async'; import 'package:http/http.dart' as http; +import 'package:http_parser/http_parser.dart' as http_parser; import '../ascii_tree.dart' as tree; import '../command.dart'; @@ -87,7 +88,9 @@ class LishCommand extends PubCommand { request.followRedirects = false; request.files.add(new http.MultipartFile.fromBytes( 'file', packageBytes, - filename: 'package.tar.gz')); + filename: 'package.tar.gz', + contentType: new http_parser.MediaType('application', 'gzip'))); + var postResponse = await http.Response.fromStream(await client.send(request));