mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-01-06 01:20:32 +05:30
Ignore null-keyed entries when iterating through the response headers
This commit is contained in:
parent
5edd774fc4
commit
f66c20de54
@ -68,7 +68,8 @@ public class Response {
|
|||||||
@Nullable
|
@Nullable
|
||||||
public String getHeader(String name) {
|
public String getHeader(String name) {
|
||||||
for (Map.Entry<String, List<String>> headerEntry : responseHeaders.entrySet()) {
|
for (Map.Entry<String, List<String>> headerEntry : responseHeaders.entrySet()) {
|
||||||
if (headerEntry.getKey().equalsIgnoreCase(name)) {
|
final String key = headerEntry.getKey();
|
||||||
|
if (key != null && key.equalsIgnoreCase(name)) {
|
||||||
if (headerEntry.getValue().size() > 0) {
|
if (headerEntry.getValue().size() > 0) {
|
||||||
return headerEntry.getValue().get(0);
|
return headerEntry.getValue().get(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user