Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnovdm2107 committed May 9, 2024
1 parent dbc2654 commit e895458
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,14 @@ private void handleRequestTask(final Request request, final HttpSession session)
private void processRange(final Request request, final HttpSession session) throws IOException {
final String startString = request.getParameter("start=");
final String endString = request.getParameter("end=");
if (startString == null || startString.isBlank() || (endString != null && endString.isBlank())) {
if (startString == null || startString.isBlank()) {
session.sendError(Response.BAD_REQUEST, "Missing range parameter \"start\".");
return;
}
if (endString != null && endString.isBlank()) {
session.sendError(Response.BAD_REQUEST, "Missing range parameter \"end\".");
return;
}
final MemorySegment startKey = MemorySegment.ofArray(startString.getBytes(StandardCharsets.UTF_8));
final MemorySegment endKey;
if (endString == null) {
Expand Down

0 comments on commit e895458

Please sign in to comment.