Skip to content

Commit ef44ffb

Browse files
rostopiraphillwiggins
authored andcommitted
Do not set user-agent header on Flutter Web (parse-community#249)
1 parent a1780d2 commit ef44ffb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/network/parse_http_client.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class ParseHTTPClient extends BaseClient {
1717
/// Overrides the call method for HTTP Client and adds custom headers
1818
@override
1919
Future<StreamedResponse> send(BaseRequest request) {
20-
request.headers[keyHeaderUserAgent] = _userAgent;
20+
if (!identical(0, 0.0))
21+
request.headers[keyHeaderUserAgent] = _userAgent;
2122
request.headers[keyHeaderApplicationId] = data.applicationId;
2223
if ((_sendSessionId == true) &&
2324
(data.sessionId != null) &&

0 commit comments

Comments
 (0)