Skip to content

Commit c954620

Browse files
brianquinlanCommit Queue
authored andcommitted
[io] Clarify the meaning if 'unsolicited response' exception
Bug:#60333 Change-Id: Ife1adc7d50d08810d662cb77ec16fafb1a5fa2b5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427042 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Brian Quinlan <[email protected]>
1 parent 49562fd commit c954620

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdk/lib/_http/http_impl.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,11 @@ class _HttpClientConnection {
22012201
// We assume the response is not here, until we have send the request.
22022202
if (_nextResponseCompleter == null) {
22032203
throw HttpException(
2204-
"Unexpected response (unsolicited response without request).",
2204+
"Unexpected response (unsolicited response without request). This "
2205+
"can be caused when a malformed request is sent to the server "
2206+
"(e.g. a GET request containing a body) or if the server is not "
2207+
"correctly implemented. Future requests to this server, using the "
2208+
"same HttpClient, are likely to fail.",
22052209
uri: _currentUri,
22062210
);
22072211
}

0 commit comments

Comments
 (0)