Home
last modified time | relevance | path

Searched refs:NanoHTTPD (Results 1 – 25 of 37) sorted by relevance

12

/external/nanohttpd/core/src/test/java/fi/iki/elonen/
DHttpDeleteRequestTest.java45 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.NO_CONTENT, in testDeleteRequestThatDoesntSendBackResponseBody_EmptyString()
63 …this.testServer.response = NanoHTTPD.newChunkedResponse(NanoHTTPD.Response.Status.NO_CONTENT, Nano… in testDeleteRequestThatDoesntSendBackResponseBody_NullInputStream()
81 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.NO_CONTENT, in testDeleteRequestThatDoesntSendBackResponseBody_NullString()
99 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.ACCEPTED, "a… in testDeleteRequestThatSendsBackResponseBody_Accepted()
118 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.OK, "applica… in testDeleteRequestThatSendsBackResponseBody_Success()
DMimeTest.java43 Assert.assertEquals("text/html", NanoHTTPD.getMimeTypeForFile("xxxx.html")); in testExistingMimeType()
48 Assert.assertNull(NanoHTTPD.mimeTypes().get("notExistent")); in testNotExistingMimeType()
49 … Assert.assertEquals("application/octet-stream", NanoHTTPD.getMimeTypeForFile("xxxx.notExistent")); in testNotExistingMimeType()
54 Assert.assertEquals("video/wrongOverwrite", NanoHTTPD.getMimeTypeForFile("xxxx.ts")); in testOverwritenMimeType()
59 NanoHTTPD.mimeTypes().put("flv", "video/manualOverwrite"); in testManualMimeType()
60 Assert.assertEquals("video/manualOverwrite", NanoHTTPD.getMimeTypeForFile("xxxx.flv")); in testManualMimeType()
DJavaIOTempDirExistTest.java43 import fi.iki.elonen.NanoHTTPD.DefaultTempFile;
53 NanoHTTPD.DefaultTempFileManager manager = new NanoHTTPD.DefaultTempFileManager(); in testJavaIoTempDefault()
78 new NanoHTTPD.DefaultTempFileManager(); in testJavaIoTempSpecific()
DHttpKeepAliveTest.java96NanoHTTPD.DefaultTempFileManager tempFileManager = new NanoHTTPD.DefaultTempFileManager(); in testManyRequests()
98NanoHTTPD.HTTPSession session = HttpKeepAliveTest.this.testServer.createSession(tempFileManager, i… in testManyRequests()
DHttpChunkedResponseTest.java36 import static fi.iki.elonen.NanoHTTPD.Response.Status.OK;
88 this.testServer.response = new NanoHTTPD(0) { in thatChunkedContentIsChunked()
DServerSocketFactoryTest.java45 import fi.iki.elonen.NanoHTTPD.SecureServerSocketFactory;
47 public class ServerSocketFactoryTest extends NanoHTTPD {
DHttpServerTest.java62 public static class TestServer extends NanoHTTPD {
117 public static class TestTempFileManager extends NanoHTTPD.DefaultTempFileManager {
156NanoHTTPD.HTTPSession session = this.testServer.createSession(this.tempFileManager, inputStream, o… in invokeServer()
DSSLServerSocketFactoryTest.java50 import fi.iki.elonen.NanoHTTPD.SecureServerSocketFactory;
70 …this.testServer.setServerSocketFactory(new SecureServerSocketFactory(NanoHTTPD.makeSSLSocketFactor… in setUp()
/external/nanohttpd/core/src/test/java/fi/iki/elonen/integration/
DGZipIntegrationTest.java54 import fi.iki.elonen.NanoHTTPD;
58 public static class TestServer extends NanoHTTPD {
84 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in contentEncodingShouldBeAddedToFixedLengthResponses()
96 …testServer.response = NanoHTTPD.newChunkedResponse(NanoHTTPD.Response.Status.OK, "text/plain", dat… in contentEncodingShouldBeAddedToChunkedResponses()
107 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in shouldFindCorrectAcceptEncodingAmongMany()
118 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in contentLengthShouldBeRemovedFromZippedResponses()
128 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in fixedLengthContentIsEncodedProperly()
138 …testServer.response = NanoHTTPD.newChunkedResponse(NanoHTTPD.Response.Status.OK, "text/plain", dat… in chunkedContentIsEncodedProperly()
147 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in noGzipWithoutAcceptEncoding()
157 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in contentShouldNotBeGzippedIfContentLengthIsAddedManually()
DPutStreamIntegrationTest.java48 import fi.iki.elonen.NanoHTTPD;
52 public static class TestServer extends NanoHTTPD {
70 …return newFixedLengthResponse(Response.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, e.getMessa… in serve()
DIntegrationTestBase.java42 import fi.iki.elonen.NanoHTTPD;
47 public abstract class IntegrationTestBase<T extends NanoHTTPD> {
DCookieIntegrationTest.java50 import fi.iki.elonen.NanoHTTPD;
57 public static class CookieTestServer extends NanoHTTPD {
87 this.testServer.cookiesToSend.add(new NanoHTTPD.Cookie("name", "value", 30)); in testCookieSentBackToClient()
DShutdownTest.java46 import fi.iki.elonen.NanoHTTPD;
50 private class TestServer extends NanoHTTPD {
/external/nanohttpd/nanolets/src/test/java/fi/iki/elonen/router/
DAppNanolets.java50 import fi.iki.elonen.NanoHTTPD;
51 import fi.iki.elonen.NanoHTTPD.Response.IStatus;
52 import fi.iki.elonen.NanoHTTPD.Response.Status;
66 public String getText(Map<String, String> urlParams, NanoHTTPD.IHTTPSession session) { in getText()
91 public NanoHTTPD.Response.IStatus getStatus() { in getStatus()
92 return NanoHTTPD.Response.Status.OK; in getStatus()
95 …public NanoHTTPD.Response get(UriResource uriResource, Map<String, String> urlParams, NanoHTTPD.IH… in get()
99 return NanoHTTPD.newFixedLengthResponse(getStatus(), getMimeType(), inp, size); in get()
/external/nanohttpd/fileupload/src/main/java/fi/iki/elonen/
DNanoFileUpload.java36 import static fi.iki.elonen.NanoHTTPD.Method.POST;
58 private NanoHTTPD.IHTTPSession session;
60 public NanoHttpdContext(NanoHTTPD.IHTTPSession session) { in NanoHttpdContext()
98 public static final boolean isMultipartContent(NanoHTTPD.IHTTPSession session) { in isMultipartContent()
106 public List<FileItem> parseRequest(NanoHTTPD.IHTTPSession session) throws FileUploadException { in parseRequest()
110 …public Map<String, List<FileItem>> parseParameterMap(NanoHTTPD.IHTTPSession session) throws FileUp… in parseParameterMap()
114 …public FileItemIterator getItemIterator(NanoHTTPD.IHTTPSession session) throws FileUploadException… in getItemIterator()
/external/nanohttpd/core/src/main/java/fi/iki/elonen/util/
DServerRunner.java40 import fi.iki.elonen.NanoHTTPD;
49 public static void executeInstance(NanoHTTPD server) { in executeInstance()
51 server.start(NanoHTTPD.SOCKET_READ_TIMEOUT, false); in executeInstance()
68 public static <T extends NanoHTTPD> void run(Class<T> serverClass) { in run()
/external/nanohttpd/markdown-plugin/src/main/java/fi/iki/elonen/
DMarkdownWebServerPlugin.java36 import static fi.iki.elonen.NanoHTTPD.Response.Status.OK;
110 …public NanoHTTPD.Response serveFile(String uri, Map<String, String> headers, NanoHTTPD.IHTTPSessio… in serveFile()
119 …return markdownSource == null ? null : new NanoHTTPD.Response(OK, NanoHTTPD.MIME_HTML, new ByteArr… in serveFile()
/external/nanohttpd/nanolets/src/main/java/fi/iki/elonen/router/
DRouterNanoHTTPD.java53 import fi.iki.elonen.NanoHTTPD;
54 import fi.iki.elonen.NanoHTTPD.Response.IStatus;
55 import fi.iki.elonen.NanoHTTPD.Response.Status;
61 public class RouterNanoHTTPD extends NanoHTTPD {
94 return NanoHTTPD.newChunkedResponse(getStatus(), getMimeType(), getData()); in get()
125 return NanoHTTPD.newFixedLengthResponse(getStatus(), getMimeType(), getText()); in get()
173 return NanoHTTPD.newFixedLengthResponse(getStatus(), getMimeType(), text.toString()); in get()
233 …return NanoHTTPD.newChunkedResponse(getStatus(), getMimeTypeForFile(fileOrdirectory.getName()), fi… in get()
235 …return NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.REQUEST_TIMEOUT, "text/plain", n… in get()
389 return NanoHTTPD.newFixedLengthResponse(Status.OK, "text/plain", // in process()
[all …]
/external/nanohttpd/core/src/main/java/fi/iki/elonen/
DNanoHTTPD.java94 import fi.iki.elonen.NanoHTTPD.Response.IStatus;
95 import fi.iki.elonen.NanoHTTPD.Response.Status;
148 public abstract class NanoHTTPD { class
186 TempFileManager tempFileManager = NanoHTTPD.this.tempFileManagerFactory.create(); in run()
200 NanoHTTPD.LOG.log(Level.FINE, "Communication with the client broken", e); in run()
206 NanoHTTPD.this.asyncRunner.closed(this); in run()
344 …ist<ClientHandler> running = Collections.synchronizedList(new ArrayList<NanoHTTPD.ClientHandler>()…
445 NanoHTTPD.LOG.log(Level.WARNING, "could not delete file ", ignored); in clear()
624NanoHTTPD.LOG.log(Level.FINE, "no protocol version specified, strange. Assuming HTTP/1.1."); in decodeHeader()
866 …Response resp = newFixedLengthResponse(Response.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, "… in execute()
[all …]
/external/nanohttpd/webserver/src/test/java/fi/iki/elonen/
DDummyPlugin.java41 import fi.iki.elonen.NanoHTTPD.IHTTPSession;
42 import fi.iki.elonen.NanoHTTPD.Response;
43 import fi.iki.elonen.NanoHTTPD.Response.Status;
/external/nanohttpd/webserver/src/main/java/fi/iki/elonen/
DWebServerPlugin.java39 import fi.iki.elonen.NanoHTTPD.IHTTPSession;
50NanoHTTPD.Response serveFile(String uri, Map<String, String> headers, IHTTPSession session, File f… in serveFile()
DInternalRewrite.java39 import fi.iki.elonen.NanoHTTPD.Response;
51 super(Status.OK, NanoHTTPD.MIME_HTML, new ByteArrayInputStream(new byte[0]), 0); in InternalRewrite()
DSimpleWebServer.java54 import fi.iki.elonen.NanoHTTPD.Response.IStatus;
57 public class SimpleWebServer extends NanoHTTPD {
267 …return newFixedLengthResponse(Response.Status.FORBIDDEN, NanoHTTPD.MIME_PLAINTEXT, "FORBIDDEN: " +… in getForbiddenResponse()
271 …return newFixedLengthResponse(Response.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, "INTERNAL … in getInternalErrorResponse()
275 …return newFixedLengthResponse(Response.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT, "Error 404, fil… in getNotFoundResponse()
354 Response response = NanoHTTPD.newFixedLengthResponse(status, mimeType, message); in newFixedLengthResponse()
363 r = new NanoHTTPD.Response(Response.Status.OK, MIME_PLAINTEXT, null, 0); in respond()
402 …newFixedLengthResponse(Response.Status.REDIRECT, NanoHTTPD.MIME_HTML, "<html><body>Redirected: <a … in defaultRespond()
414 … return newFixedLengthResponse(Response.Status.OK, NanoHTTPD.MIME_HTML, listDirectory(uri, f)); in defaultRespond()
540 … res = newFixedLengthResponse(Response.Status.RANGE_NOT_SATISFIABLE, NanoHTTPD.MIME_PLAINTEXT, ""); in serveFile()
/external/nanohttpd/websocket/src/main/java/fi/iki/elonen/
DNanoWSD.java55 public abstract class NanoWSD extends NanoHTTPD {
77 private final NanoHTTPD.IHTTPSession handshakeRequest;
79 …private final NanoHTTPD.Response handshakeResponse = new NanoHTTPD.Response(NanoHTTPD.Response.Sta…
92 public WebSocket(NanoHTTPD.IHTTPSession handshakeRequest) { in WebSocket()
167 public NanoHTTPD.IHTTPSession getHandshakeRequest() { in getHandshakeRequest()
171 public NanoHTTPD.Response getHandshakeResponse() { in getHandshakeResponse()
838 return newFixedLengthResponse(Response.Status.BAD_REQUEST, NanoHTTPD.MIME_PLAINTEXT, in serve()
843 …return newFixedLengthResponse(Response.Status.BAD_REQUEST, NanoHTTPD.MIME_PLAINTEXT, "Missing Webs… in serve()
851 … return newFixedLengthResponse(Response.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, in serve()
/external/nanohttpd/src/site/markdown/
Dindex.md1 ## NanoHTTPD – a tiny web server in Java
3 *NanoHTTPD* is a light-weight HTTP server designed for embedding in other applications, released un…
41 import fi.iki.elonen.NanoHTTPD;
43 public class App extends NanoHTTPD {
92 NanoHTTPD project currently consist of four parts:
96 …* `/samples` – Simple examples on how to customize NanoHTTPD. See *HelloServer.java* for a killer …
149 NanoHTTPD is a Maven based project and deployed to central. Most development environments have mean…
185 Here you write your own subclass of *fi.iki.elonen.NanoHTTPD* to configure and to serve the request…
242 server.makeSecure(NanoHTTPD.makeSSLSocketFactory("/keystore.jks", "password".toCharArray()));

12