/[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.18 by hemppah, Mon May 5 13:57:48 2003 UTC revision 1.19 by hemppah, Tue May 6 06:57:04 2003 UTC
# Line 124  public class HTTPProxy implements Runnab Line 124  public class HTTPProxy implements Runnab
124    
125                  BlockId id = new BlockId(uri);                  BlockId id = new BlockId(uri);
126                  Block block = pool.get(id);                  Block block = pool.get(id);
127                  if(HTTPProxy.dbg) p("<"+port+"> Serve: "+id);                  
128                  HTTPResponse resp = resf.makeResponse(200, "Ok");                  HTTPResponse resp = resf.makeResponse(200, "Ok");
129                  resp.setField("Content-Type", id.getContentType());                  resp.setField("Content-Type", id.getContentType());
130                  if((!rewrite && !backlinks) ||                  if((!rewrite && !backlinks) ||
131                     !id.getContentType().equals("text/html")) {                     !id.getContentType().equals("text/html")) {
132                      CopyUtil.copy(block.getInputStream(),                      int blocksize = CopyUtil.copy(block.getInputStream(),
133                                    resp.getOutputStream());                                    resp.getOutputStream());
134                        if(HTTPProxy.dbg) p("<"+port+"> Serve: "+id + " (Size: " +
135                            String.valueOf(blocksize) + ")");                  
136                  } else {                  } else {
137                      if(HTTPProxy.dbg) p("Start rewrite");                      if(HTTPProxy.dbg) p("Start rewrite");
138    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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