示例#1
0
        public void manageRequest(HttpRequest request)
        {
            /* WINPHONE */
            string url = request.requestURI;
            int    pos = url.IndexOf('?');

            if (pos != -1)
            {
                url = url.Substring(0, pos);
            }

            //Debug.Log("Looking for url : " + url);
            HttpServlet servlet = getServlet(url);

            if (servlet == null)
            {
                request.response.status = 404;
                request.response.write("<html><head><title>Error 404</title></head><body><h1>Error 404</h1><p>" + request.requestURI + " not found</p></body></html>");
                request.response.flushBuffer();
            }
            else
            {
                request.response.status = 200;
                servlet.manageRequest(request);
                request.response.flushBuffer();
            }
        }
示例#2
0
 public bool addServlet(string url, HttpServlet servlet)
 {
     servlets.Add(url, servlet);
     return(true);
 }
示例#3
0
 public bool addServlet(string url, HttpServlet servlet)
 {
     servlets.Add(url, servlet);
     return true;
 }
 public void addServlet(string url, HttpServlet servlet)
 {
 }
 public void addServlet(string url, HttpServlet servlet)
 {
 }