This commit is contained in:
Looly
2022-09-04 20:57:26 +08:00
parent c72e2bb5ba
commit d52d36cfdc
15 changed files with 392 additions and 352 deletions

View File

@@ -180,7 +180,7 @@ public enum GlobalHeaders {
for (final Entry<String, List<String>> entry : headers.entrySet()) {
name = entry.getKey();
for (final String value : entry.getValue()) {
this.header(name, StrUtil.nullToEmpty(value), false);
this.header(name, StrUtil.emptyIfNull(value), false);
}
}
return this;

View File

@@ -174,7 +174,7 @@ public abstract class HttpBase<T> {
}
for (final Entry<String, String> entry : headers.entrySet()) {
this.header(entry.getKey(), StrUtil.nullToEmpty(entry.getValue()), isOverride);
this.header(entry.getKey(), StrUtil.emptyIfNull(entry.getValue()), isOverride);
}
return (T) this;
}
@@ -207,7 +207,7 @@ public abstract class HttpBase<T> {
for (final Entry<String, List<String>> entry : headers.entrySet()) {
name = entry.getKey();
for (final String value : entry.getValue()) {
this.header(name, StrUtil.nullToEmpty(value), isOverride);
this.header(name, StrUtil.emptyIfNull(value), isOverride);
}
}
return (T) this;
@@ -227,7 +227,7 @@ public abstract class HttpBase<T> {
}
for (final Entry<String, String> entry : headers.entrySet()) {
this.header(entry.getKey(), StrUtil.nullToEmpty(entry.getValue()), false);
this.header(entry.getKey(), StrUtil.emptyIfNull(entry.getValue()), false);
}
return (T) this;
}

View File

@@ -213,7 +213,7 @@ public class HttpConnection {
for (final Entry<String, List<String>> entry : headerMap.entrySet()) {
name = entry.getKey();
for (final String value : entry.getValue()) {
this.header(name, StrUtil.nullToEmpty(value), isOverride);
this.header(name, StrUtil.emptyIfNull(value), isOverride);
}
}
}