Skip to content

Commit b770675

Browse files
committed
The content of Resonse may be empty
1 parent 014e0d1 commit b770675

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/hunt/httpclient/Response.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Response {
2727
* @return string
2828
*/
2929
string content() {
30-
if(_stringContent.empty()) {
30+
if(_stringContent.empty() && _response.haveBody()) {
3131
_stringContent = _response.getBody().toString();
3232
}
3333
return _stringContent;

0 commit comments

Comments
 (0)