/// <exception cref="Javax.Servlet.ServletException"/> /// <exception cref="System.IO.IOException"/> protected override void DoPost(HttpServletRequest req, HttpServletResponse resp) { InputStream @is = req.GetInputStream(); OutputStream os = resp.GetOutputStream(); int c = @is.Read(); while (c > -1) { os.Write(c); c = @is.Read(); } @is.Close(); os.Close(); resp.SetStatus(HttpServletResponse.ScOk); }
/// <exception cref="Javax.Servlet.ServletException"/> /// <exception cref="System.IO.IOException"/> protected override void DoGet(HttpServletRequest request, HttpServletResponse response ) { InputStreamReader @in = new InputStreamReader(request.GetInputStream()); TextWriter @out = new TextWriter(response.GetOutputStream()); calledTimes++; try { requestUri = new URI(null, null, request.GetRequestURI(), request.GetQueryString( ), null); } catch (URISyntaxException) { } @in.Close(); @out.Close(); }