Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.savant
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ logbackVersion = "1.5.13"
slf4jVersion = "2.0.13"
testngVersion = "7.8.0"

project(group: "org.primeframework", name: "prime-mvc", version: "5.8.1", licenses: ["ApacheV2_0"]) {
project(group: "org.primeframework", name: "prime-mvc", version: "5.8.2", licenses: ["ApacheV2_0"]) {
workflow {
fetch {
// Dependency resolution order:
Expand Down
27 changes: 16 additions & 11 deletions src/test/java/org/primeframework/mvc/test/RequestBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -491,17 +491,6 @@ public RequestBuilder withCookie(String name, String value) throws Exception {
return withCookie(name, value, false, false);
}

/**
* Encrypt the provided value and add a cookie with the encrypted value to the request
*
* @param name The name of the cookie.
* @param value The unencrypted value of the cookie.
* @return This.
*/
public RequestBuilder withEncryptedCookie(String name, String value) throws Exception {
return withCookie(name, value, false, true);
}

/**
* Add a cookie to the request.
*
Expand All @@ -526,6 +515,17 @@ public RequestBuilder withEncoding(Charset encoding) {
return this;
}

/**
* Encrypt the provided value and add a cookie with the encrypted value to the request
*
* @param name The name of the cookie.
* @param value The unencrypted value of the cookie.
* @return This.
*/
public RequestBuilder withEncryptedCookie(String name, String value) throws Exception {
return withCookie(name, value, false, true);
}

/**
* Adds a file.
*
Expand Down Expand Up @@ -847,6 +847,11 @@ HTTPResponseWrapper run() {
}

List<Locale> locales = request.getLocales();
if (locales.isEmpty()) {
// request.getLocale() returns a default locale if none are set by httpRequestConsumer but
// we still want to set to the system's default, if none were explicitly set.
locales = List.of(Locale.getDefault());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't do it the old way, because now with multiple header support working correctly, that breaks LocaleActionTest

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should move these lines down to line 890 where locales is used.
Then we won't need the if clause, if (!locales.isEmpty()) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good idea. Pushed.

String contentType = request.getContentType();
Charset characterEncoding = request.getCharacterEncoding();
HTTPMethod method = request.getMethod();
Expand Down