/[storm]/storm/org/nongnu/storm/util/HTTPProxy.java
ViewVC logotype

Diff of /storm/org/nongnu/storm/util/HTTPProxy.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by tuukkah, Fri Apr 25 13:31:07 2003 UTC revision 1.10 by tuukkah, Fri Apr 25 14:02:43 2003 UTC
# Line 35  import java.io.*; Line 35  import java.io.*;
35  import java.net.*;  import java.net.*;
36  import java.util.Iterator;  import java.util.Iterator;
37    
38  /** An HTTP server serving blocks from a Storm pool.  /** An HTTP server serving blocks from a Storm pool. When started from command
39     *  line, it servers the directory given as first argument.
40   */   */
41  public class HTTPProxy implements Runnable {  public class HTTPProxy implements Runnable {
42      public static boolean dbg = false;      public static boolean dbg = false;
# Line 111  public class HTTPProxy implements Runnab Line 112  public class HTTPProxy implements Runnab
112    
113                  BlockId id = new BlockId(uri);                  BlockId id = new BlockId(uri);
114                  Block block = pool.get(id);                  Block block = pool.get(id);
115                  if(dbg) p("<"+port+"> Serve: "+id);                  if(HTTPProxy.dbg) p("<"+port+"> Serve: "+id);
116                  HTTPResponse resp = resf.makeResponse(200, "Ok");                  HTTPResponse resp = resf.makeResponse(200, "Ok");
117                  resp.setField("Content-Type", id.getContentType());                  resp.setField("Content-Type", id.getContentType());
118                  if(!rewrite || !id.getContentType().equals("text/html")) {                  if(!rewrite || !id.getContentType().equals("text/html")) {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26