Skip to content

Commit ea94a63

Browse files
committed
Fix body bytes to return non-null
1 parent ba288e0 commit ea94a63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/jodd/http/HttpBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,11 @@ public String bodyRaw() {
615615
}
616616

617617
/**
618-
* Returns <b>raw</b> body bytes. Returns empty string if body is not specified.
618+
* Returns <b>raw</b> body bytes. Returns empty array if body is not specified.
619619
*/
620620
public byte[] bodyBytes() {
621621
if (body == null) {
622-
return null;
622+
return new byte[0];
623623
}
624624
return body.getBytes(StandardCharsets.ISO_8859_1);
625625
}

0 commit comments

Comments
 (0)