Skip to content

Commit

Permalink
updated from 12 with #9402
Browse files Browse the repository at this point in the history
Signed-off-by: gregw <gregw@webtide.com>
  • Loading branch information
gregw committed Feb 21, 2023
1 parent 77bc30a commit 2eabeb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,6 @@ public boolean compliesWith(CookieCompliance mode)
@Override
public String toString()
{
return "%s@%x%s".formatted(_name, hashCode(), _violations);
return String.format("%s@%x%s", _name, hashCode(), _violations);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;

import org.eclipse.jetty.http.BadMessageException;
import org.eclipse.jetty.http.CookieCache;
import org.eclipse.jetty.http.CookieParser;
import org.eclipse.jetty.http.HttpCookie;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpURI;
import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http.Trailers;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.server.internal.HttpChannelState;
import org.eclipse.jetty.util.Attributes;
import org.eclipse.jetty.util.Callback;
Expand Down Expand Up @@ -445,14 +443,7 @@ static List<HttpCookie> getCookies(Request request)
request.getComponents().getCache().setAttribute(CACHE_ATTRIBUTE, cookieCache);
}

try
{
cookies = cookieCache.getCookies(request.getHeaders());
}
catch (CookieParser.InvalidCookieException invalidCookieException)
{
throw new BadMessageException(HttpStatus.BAD_REQUEST_400, invalidCookieException);
}
cookies = cookieCache.getCookies(request.getHeaders());
request.setAttribute(COOKIE_ATTRIBUTE, cookies);
return cookies;
}
Expand Down

0 comments on commit 2eabeb2

Please sign in to comment.