Examples of headerForKey()


Examples of com.webobjects.appserver.WOResponse.headerForKey()

    @Override
    public WOActionResults performActionNamed( String name ) {
      WOResponse response = ERXStyleSheet.cache( session() ).objectForKey( name );
      String md5 = ERXStringUtilities.md5Hex( response.contentString(), null );
      String queryMd5 = response.headerForKey( "checksum" );
      if (ObjectUtils.equals(md5, queryMd5)) {
        //TODO check for last-whatever time and return not modified if not changed
      }
      return response;
    }
View Full Code Here

Examples of com.webobjects.appserver.WOResponse.headerForKey()

      if (logger.isDebugEnabled()) logger.debug("Considering pageReplacementCache for " + context.request().uri() + " with contextID " + context.contextID());
      WORequest request = context.request();
      WOResponse response = context.response();
      String pageCacheKey = null;
      if (response != null) {
        pageCacheKey = response.headerForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY);
      }
      if (pageCacheKey == null && request != null) {
        pageCacheKey = request.headerForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY);
      }
View Full Code Here

Examples of com.webobjects.appserver.WOResponse.headerForKey()

      // String newSessionID = request.sessionID();
      // if (newSessionID != null) {
      // conversation.setSessionID(newSessionID);
      // }
      if (response != null) {
        String nextRequestUrl = response.headerForKey(InstantMessengerAdaptor.IM_ACTION_URL_KEY);
        conversation.setRequestUrl(nextRequestUrl);
        String responseMessage = response.contentString();
        if (responseMessage != null) {
          responseMessage = responseMessage.trim();
        }
View Full Code Here

Examples of com.webobjects.appserver.WOResponse.headerForKey()

    if (requestHandlingLog.isDebugEnabled()) {
      requestHandlingLog.debug("Returning, encoding: " + response.contentEncoding() + " response: " + response);
    }

    if (responseCompressionEnabled()) {
      String contentType = response.headerForKey("content-type");
      if (!"gzip".equals(response.headerForKey("content-encoding")) && (contentType != null) && (contentType.startsWith("text/") || responseCompressionTypes().containsObject(contentType))) {
        String acceptEncoding = request.headerForKey("accept-encoding");
        if ((acceptEncoding != null) && (acceptEncoding.toLowerCase().indexOf("gzip") != -1)) {
          long start = System.currentTimeMillis();
          long inputBytesLength;
View Full Code Here

Examples of com.webobjects.appserver.WOResponse.headerForKey()

      requestHandlingLog.debug("Returning, encoding: " + response.contentEncoding() + " response: " + response);
    }

    if (responseCompressionEnabled()) {
      String contentType = response.headerForKey("content-type");
      if (!"gzip".equals(response.headerForKey("content-encoding")) && (contentType != null) && (contentType.startsWith("text/") || responseCompressionTypes().containsObject(contentType))) {
        String acceptEncoding = request.headerForKey("accept-encoding");
        if ((acceptEncoding != null) && (acceptEncoding.toLowerCase().indexOf("gzip") != -1)) {
          long start = System.currentTimeMillis();
          long inputBytesLength;
          InputStream contentInputStream = response.contentInputStream();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.