Skip to content

Commit

Permalink
Fix content-length-header (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
donny-dont authored and nex3 committed Sep 20, 2017
1 parent e1533c4 commit ebd0b33
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions lib/src/io_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ class IOClient extends BaseClient {
ioRequest
..followRedirects = context['io.followRedirects'] ?? true
..maxRedirects = context['io.maxRedirects'] ?? 5
..contentLength = request.contentLength == null
? -1
: request.contentLength
..persistentConnection = context['io.persistentConnection'] ?? true;
request.headers.forEach((name, value) {
ioRequest.headers.set(name, value);
Expand Down
1 change: 1 addition & 0 deletions test/client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ void main() {
'method': 'DELETE',
'path': '/',
'headers': {
'content-length': ['0'],
'user-agent': [userAgent()],
'x-random-header': ['Value'],
'x-other-header': ['Other Value']
Expand Down

0 comments on commit ebd0b33

Please sign in to comment.