diff --git a/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/impl/IpCamMJPEGStream.java b/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/impl/IpCamMJPEGStream.java index b7c95146..2d00672e 100644 --- a/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/impl/IpCamMJPEGStream.java +++ b/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/impl/IpCamMJPEGStream.java @@ -34,7 +34,7 @@ public class IpCamMJPEGStream extends DataInputStream { /** * Name of content length header. */ - private final String CONTENT_LENGTH = "Content-Length"; + private final String CONTENT_LENGTH = "Content-Length".toLowerCase(); /** * Maximum header length. @@ -82,7 +82,7 @@ private int parseContentLength(byte[] headerBytes) throws IOException, NumberFor String line = null; while ((line = br.readLine()) != null) { - if (line.startsWith(CONTENT_LENGTH)) { + if (line.toLowerCase().startsWith(CONTENT_LENGTH)) { String[] parts = line.split(":"); if (parts.length == 2) { return Integer.parseInt(parts[1].trim());