Remove broken spam/referrer handling

This commit is contained in:
Manuel Fuhr 2022-10-28 19:44:37 +02:00
parent 3a4d743eb5
commit 06f0315cf4
2 changed files with 0 additions and 28 deletions

View file

@ -4,7 +4,6 @@ package btools.server;
import org.json.JSONObject;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
@ -102,15 +101,4 @@ public class RouteServerTest {
Assert.assertEquals(HttpURLConnection.HTTP_NOT_FOUND, httpConnection.getResponseCode());
}
@Test
@Ignore("Broken implementation (uppercase / lowercase issue)")
public void invalidReferrer() throws IOException {
URL requestUrl = new URL(baseUrl + "brouter/%7C/%2C");
HttpURLConnection httpConnection = (HttpURLConnection) requestUrl.openConnection();
httpConnection.setRequestProperty("Referer", "http://brouter.de/brouter-web/");
httpConnection.connect();
Assert.assertEquals(HttpURLConnection.HTTP_FORBIDDEN, httpConnection.getResponseCode());
}
}