Skip to content

Commit 708926c

Browse files
tworoguevelo
authored andcommitted
Fixes RecordedRequestAssert.hasNoHeaderNamed (now it returns 'false' in corresponding cases (#835)
Fixes #679
1 parent c2ec248 commit 708926c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/test/java/feign/assertj/RecordedRequestAssert.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public RecordedRequestAssert hasNoHeaderNamed(final String... names) {
157157
Set<String> found = new LinkedHashSet<String>();
158158
for (String header : actual.getHeaders().names()) {
159159
for (String name : names) {
160-
if (header.toLowerCase().startsWith(name.toLowerCase() + ":")) {
160+
if (header.equalsIgnoreCase(name)) {
161161
found.add(header);
162162
}
163163
}

httpclient/src/main/java/feign/httpclient/ApacheHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ HttpUriRequest toHttpUriRequest(Request request, Request.Options options)
153153
}
154154

155155
private ContentType getContentType(Request request) {
156-
ContentType contentType = ContentType.DEFAULT_TEXT;
156+
ContentType contentType = null;
157157
for (Map.Entry<String, Collection<String>> entry : request.headers().entrySet())
158158
if (entry.getKey().equalsIgnoreCase("Content-Type")) {
159159
Collection<String> values = entry.getValue();

0 commit comments

Comments
 (0)