Skip to content
This repository has been archived by the owner on Dec 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #291 from opencharles/290
Browse files Browse the repository at this point in the history
assume https
  • Loading branch information
amihaiemil authored Jan 23, 2019
2 parents 5b13d4c + 418129e commit 47cd393
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public Response search(
SearchResultsPage results = aws.search(query);

String queryStringFormat = "?kw=%s&ctg=%s&index=%s&size=%s";
String requestUrl = servletRequest.getRequestURL().toString();
String requestUrl = servletRequest.getRequestURL().toString().replace("http://", "https://");
if(idx == 0) {
results = results.withPrevPage("-");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void pagesAreDisplayed() throws IOException {
MatcherAssert.assertThat(
page.getString("nextPage"),
Matchers.equalTo(
"http://example.com?kw=test&ctg=page&index=3&size=3"
"https://example.com?kw=test&ctg=page&index=3&size=3"
)
);
MatcherAssert.assertThat(
Expand All @@ -99,13 +99,13 @@ public void pagesAreDisplayed() throws IOException {
MatcherAssert.assertThat(
page.getJsonArray("pages").getString(0),
Matchers.equalTo(
"http://example.com?kw=test&ctg=page&index=0&size=3"
"https://example.com?kw=test&ctg=page&index=0&size=3"
)
);
MatcherAssert.assertThat(
page.getJsonArray("pages").getString(8),
Matchers.equalTo(
"http://example.com?kw=test&ctg=page&index=24&size=3"
"https://example.com?kw=test&ctg=page&index=24&size=3"
)
);
} finally {
Expand Down

0 comments on commit 47cd393

Please sign in to comment.