From 04f146f4eaedc38d32c8f54b16c68c237abb7b31 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 2 Oct 2013 17:37:50 -0700 Subject: Fix web commit --- src/github/daneren2005/dsub/service/StreamProxy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/service/StreamProxy.java b/src/github/daneren2005/dsub/service/StreamProxy.java index 287cb475..78aa7f56 100644 --- a/src/github/daneren2005/dsub/service/StreamProxy.java +++ b/src/github/daneren2005/dsub/service/StreamProxy.java @@ -128,9 +128,9 @@ public class StreamProxy implements Runnable { // Get all of the headers try { String line; - while(line = reader.readLine() && !"".equals(line)) { + while((line = reader.readLine()) != null && !"".equals(line)) { String headerName = line.substring(0, line.indexOf(':')); - String headerValue = line.substring(line.indexOf(': ') + 2); + String headerValue = line.substring(line.indexOf(": ") + 2); request.addHeader(headerName, headerValue); } } catch(IOException e) { @@ -160,7 +160,7 @@ public class StreamProxy implements Runnable { Log.i(TAG, "Processing request for file " + localPath); downloadFile = downloadService.getCurrentPlaying(); File partialFile = new File(localPath); - if (!file.equals(downloadFile.getPartialFile()) { + if (!partialFile.equals(downloadFile.getPartialFile())) { Log.e(TAG, "File " + localPath + " does not exist"); return false; } -- cgit v1.2.3