/[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.30 by benja, Fri May 9 18:35:04 2003 UTC revision 1.31 by tuukkah, Tue May 13 09:52:14 2003 UTC
# Line 134  public class HTTPProxy implements Runnab Line 134  public class HTTPProxy implements Runnab
134                  String s = CopyUtil.readString(block.getInputStream());                  String s = CopyUtil.readString(block.getInputStream());
135    
136                  String prefix = "";                  String prefix = "";
137                  if(rewrite) prefix = ROOTURL+REWRITE+"/";                  if(rewrite) {
138                  if(backlinks) prefix += BACKLINKS+"/";                      prefix = ROOTURL+REWRITE+"/";
139                        if(backlinks) prefix += BACKLINKS+"/";
140                    }
141    
142                  if(rewrite)                  if(rewrite)
143                      s = rewriteURIs(s, prefix);                      s = rewriteURIs(s, prefix);
144    
                 /* XXX If no rewrite, should the links be URNs or backlinks/ */  
145                  if(backlinks)                  if(backlinks)
146                      s = insertBacklinks(s, prefix, id);                      s = insertBacklinks(s, prefix, id);
147                                                    
# Line 230  public class HTTPProxy implements Runnab Line 231  public class HTTPProxy implements Runnab
231                  for(Iterator i=ids.iterator(); i.hasNext();) {                  for(Iterator i=ids.iterator(); i.hasNext();) {
232                      BlockId id = (BlockId)i.next();                      BlockId id = (BlockId)i.next();
233                      String s = id.getURI();                      String s = id.getURI();
234                      if(rewrite) s = base + s;                      if(rewrite || id.getContentType().equals("text/html"))
235                            s = base + s;
236                      w.write("<a href=\""+s+"\">"+id+"</a><br>\n");                      w.write("<a href=\""+s+"\">"+id+"</a><br>\n");
237                  }                  }
238              }              }

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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