Skip to content
Browse files

Merge pull request #37 from abduegal/feature/offline-ds-read

Feature/offline ds read
  • Loading branch information...
2 parents 78e674b + 0c36184 commit 46aaf863da4caac687491dab40800fe4e4f21c37 @danielegobbetti danielegobbetti committed May 25, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/org/mixare/mgr/HttpTools.java
View
7 src/org/mixare/mgr/HttpTools.java
@@ -64,7 +64,12 @@
*/
public static String getPageContent(DownloadRequest request, ContentResolver cr) throws Exception {
String pageContent;
- InputStream is = HttpTools.getHttpGETInputStream(request.getSource().getUrl() + request.getParams(), cr);
+ InputStream is = null;
+ if(!request.getSource().getUrl().startsWith("file://")){
+ is = HttpTools.getHttpGETInputStream(request.getSource().getUrl() + request.getParams(), cr);
+ }else{
+ is = HttpTools.getHttpGETInputStream(request.getSource().getUrl(), cr);
+ }
pageContent = HttpTools.getHttpInputString(is);
HttpTools.returnHttpInputStream(is);
return pageContent;

0 comments on commit 46aaf86

Please sign in to comment.
Something went wrong with that request. Please try again.