Small changes

pull/1/head
cominch 13 years ago committed by Michael Peter Christen
parent bcbd8eee33
commit ae8adb0e58

@ -73,7 +73,7 @@ public class Triple {
} }
if (post.containsKey("comment")) { if (post.containsKey("url")) {
Interaction.Triple(url, s, p, o, from); Interaction.Triple(url, s, p, o, from);

@ -1476,9 +1476,11 @@ public final class HTTPDFileHandler {
if (proxyurl.getPath().lastIndexOf('/') > 0) if (proxyurl.getPath().lastIndexOf('/') > 0)
directory = proxyurl.getPath().substring(0, proxyurl.getPath().lastIndexOf('/')); directory = proxyurl.getPath().substring(0, proxyurl.getPath().lastIndexOf('/'));
String location = "";
if (outgoingHeader.containsKey("Location")) { if (outgoingHeader.containsKey("Location")) {
// rewrite location header // rewrite location header
String location = outgoingHeader.get("Location"); location = outgoingHeader.get("Location");
if (location.startsWith("http")) { if (location.startsWith("http")) {
location = "/proxy.html?url=" + location; location = "/proxy.html?url=" + location;
} else { } else {
@ -1488,7 +1490,7 @@ public final class HTTPDFileHandler {
} }
final String mimeType = outgoingHeader.getContentType(); final String mimeType = outgoingHeader.getContentType();
if (mimeType.startsWith("text/html") || mimeType.startsWith("text")) { if ((mimeType.startsWith("text/html") || mimeType.startsWith("text"))) {
final StringWriter buffer = new StringWriter(); final StringWriter buffer = new StringWriter();
if (outgoingHeader.containsKey(HeaderFramework.TRANSFER_ENCODING)) { if (outgoingHeader.containsKey(HeaderFramework.TRANSFER_ENCODING)) {

Loading…
Cancel
Save