mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-13 22:00: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
|
||||
public String getHeader(String name) {
|
||||
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) {
|
||||
return headerEntry.getValue().get(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user