Package play.mvc.Http

Examples of play.mvc.Http.Header


    String string = Flash.current().get(RenderResultCache.READ_THRU_FLASH);
    if (string != null) {
      RenderResultCache.setIgnoreCache(true);
    } else {
      // cache-control in lower case, lowercase for some reason
      Header header = Request.current().headers.get("cache-control");
      if (header != null) {
        List<String> list = header.values;
        if (list.contains(NO_CACHE)) {
          RenderResultCache.setIgnoreCache(true);
        }
View Full Code Here


        if (contentType == null || contentType.length() == 0) {
          contentType = "";
        }

        for (String k : req.headers.keySet()) {
          Header h = req.headers.get(k);
          System.out.println("... " + h.name + ":" + URLDecoder.decode(h.value(), "utf-8"));
        }
        // cookie is already in the headers
        // for (String ck : req.cookies.keySet()) {
        // Cookie c = req.cookies.get(ck);
        // System.out.println("... cookie --> " + c.name + ":" +
View Full Code Here

    String string = Flash.current().get(RenderResultCache.READ_THRU_FLASH);
    if (string != null) {
      RenderResultCache.setIgnoreCache(true);
    } else {
      // cache-control in lower case, lowercase for some reason
      Header header = Request.current().headers.get("cache-control");
      if (header != null) {
        List<String> list = header.values;
        if (list.contains(NO_CACHE)) {
          RenderResultCache.setIgnoreCache(true);
        }
View Full Code Here

        if (contentType == null || contentType.length() == 0) {
          contentType = "";
        }

        for (String k : req.headers.keySet()) {
          Header h = req.headers.get(k);
          System.out.println("... " + h.name + ":" + URLDecoder.decode(h.value(), "utf-8"));
        }
        // cookie is already in the headers
        // for (String ck : req.cookies.keySet()) {
        // Cookie c = req.cookies.get(ck);
        // System.out.println("... cookie --> " + c.name + ":" +
View Full Code Here

        public List<Header> getHeaders() {
            Map<String, List<String>> hdrs = connection.getHeaderFields();
            List<Header> result = new ArrayList<Header>();
            for (String key: hdrs.keySet()) {
                result.add(new Header(key, hdrs.get(key)));
            }
            return result;
        }
View Full Code Here

        @Override
        public List<Header> getHeaders() {
            Map<String, List<String>> hdrs = response.getHeaders();
            List<Header> result = new ArrayList<Header>();
            for (String key: hdrs.keySet()) {
                result.add(new Header(key, hdrs.get(key)));
            }
            return result;
        }
View Full Code Here

        @Override
        public List<Header> getHeaders() {
            List<Header> result = new ArrayList<Header>();
            for (String key: headersMap.keySet()) {
                result.add(new Header(key, headersMap.get(key)));
            }
            return result;
        }
View Full Code Here

        @Override
        public List<Header> getHeaders() {
            Map<String, List<String>> hdrs = response.getHeaders();
            List<Header> result = new ArrayList<Header>();
            for (String key: hdrs.keySet()) {
                result.add(new Header(key, hdrs.get(key)));
            }
            return result;
        }
View Full Code Here

                response.print("Application is not started");
                response.status = 503;
                return true;
            }
            response.contentType = request.path.contains(".json") ? "application/json" : "text/plain";
            Header authorization = request.headers.get("authorization");
            if (authorization != null && (Crypto.sign("@status").equals(authorization.value()) || System.getProperty("statusKey", Play.secretKey).equals(authorization.value()))) {
                response.print(computeApplicationStatus(request.path.contains(".json")));
                response.status = 200;
                return true;
            }
            response.status = 401;
View Full Code Here

                response.print("Application is not started");
                response.status = 503;
                return true;
            }
            response.contentType = request.path.contains(".json") ? "application/json" : "text/plain";
            Header authorization = request.headers.get("authorization");
            if (request.isLoopback || (authorization != null && Crypto.sign("@status").equals(authorization.value()))) {
                response.print(computeApplicationStatus(request.path.contains(".json")));
                response.status = 200;
                return true;
            }
            response.status = 401;
View Full Code Here

TOP

Related Classes of play.mvc.Http.Header

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.