Examples of headerForKey()


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

        }

        // Checking to see if the password was corrent
        theApplication._lock.startReading();
        try {
            String passwordHeader = aRequest.headerForKey("password");
            if (!aConfig.comparePasswordWithPassword(passwordHeader)) {
                NSLog.debug.appendln("Attempt to call DirectAction: monitorRequestAction with incorrect password.");
                aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
                aResponse.appendContentString(_invalidPassword);
                // we endReading at the finally block
View Full Code Here

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

        theApplication._lock.startReading();
        try {

            // Check for correct password
            String passwordHeader = aRequest.headerForKey("password");
            if (!aConfig.comparePasswordWithPassword(passwordHeader)) {
                NSLog.debug.appendln("Attempt to call Direct Action: defaultAction with incorrect password.");
                aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
                aResponse.appendContentString("Attempt to call Direct Action: defaultAction on wotaskd with incorrect password.");
                // we endReading at the finally block
View Full Code Here

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

        if (aRequest.isUsingWebServer())  {
            aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
            aResponse.appendContentString("Access Denied");
            return aResponse;
        }
        String aPath = aRequest.headerForKey("filepath");
        boolean showFiles = (aRequest.headerForKey("showFiles") != null) ? true : false;

        // looking for roots, or root listing of only 1 root
        if (aPath == null && !singleRoot) {
            aResponse.appendContentString(xmlRoots);
View Full Code Here

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

            aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
            aResponse.appendContentString("Access Denied");
            return aResponse;
        }
        String aPath = aRequest.headerForKey("filepath");
        boolean showFiles = (aRequest.headerForKey("showFiles") != null) ? true : false;

        // looking for roots, or root listing of only 1 root
        if (aPath == null && !singleRoot) {
            aResponse.appendContentString(xmlRoots);
            aResponse.setHeader("YES", "isRoots");
View Full Code Here

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

      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);
      }

      // A null pageCacheKey should mean an Ajax request that is not returning a content update or an expliclty not cached non-Ajax request
      if (pageCacheKey != null) {
        if (logger.isDebugEnabled()) logger.debug("Will use pageCacheKey " + pageCacheKey);
View Full Code Here

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

    {
      if ((aPageName == null) && (!aSession.storesIDsInCookies()))
      {
        WORequest request = aContext.request();

        String cookieHeader = request.headerForKey("cookie");

        if ((cookieHeader != null) && (cookieHeader.length() > 0)) {
          NSDictionary cookieDict = request.cookieValues();

          if ((cookieDict.objectForKey(WOApplication.application().sessionIdKey()) != null) || (cookieDict.objectForKey(WOApplication.application().instanceIdKey()) != null)) {
View Full Code Here

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

    ERXSession.setSession(this);
    ERXLocalizer.setCurrentLocalizer(localizer());
    NSNotificationCenter.defaultCenter().postNotification(SessionWillAwakeNotification, this);

    WORequest request = context() != null ? context().request() : null;
    if (request != null && log.isDebugEnabled() && request.headerForKey("content-type") != null) {
      if ((request.headerForKey("content-type")).toLowerCase().indexOf("multipart/form-data") == -1)
        log.debug("Form values " + request.formValues());
      else
        log.debug("Multipart Form values found");
    }
View Full Code Here

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

    ERXLocalizer.setCurrentLocalizer(localizer());
    NSNotificationCenter.defaultCenter().postNotification(SessionWillAwakeNotification, this);

    WORequest request = context() != null ? context().request() : null;
    if (request != null && log.isDebugEnabled() && request.headerForKey("content-type") != null) {
      if ((request.headerForKey("content-type")).toLowerCase().indexOf("multipart/form-data") == -1)
        log.debug("Form values " + request.formValues());
      else
        log.debug("Multipart Form values found");
    }
    _originalThreadName = Thread.currentThread().getName();
View Full Code Here

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

        for (int i=0; i<theCount; i++) {
            WOResponse aResponse = responses[i];
            MInstance anInstance = (MInstance) instArray.objectAtIndex(i);
            if (aResponse != null) {
                anInstance.updateRegistration(new NSTimestamp());
                if (aResponse.headerForKey("x-webobjects-refusenewsessions") != null) {
                    anInstance.setRefusingNewSessions(true);
                } else {
                    anInstance.setRefusingNewSessions(false);
                }
View Full Code Here

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

        cachedResponse.setHeader( "text/css", "content-type" );
        cache.setObjectForKey( cachedResponse, key );
        md5 = ERXStringUtilities.md5Hex( cachedResponse.contentString(), null );
        cachedResponse.setHeader( md5, "checksum" );
      }
      md5 = cachedResponse.headerForKey( "checksum" );
      NSDictionary<String, Object> query = new NSDictionary<String, Object>( md5, "checksum" );
      href = wocontext.directActionURLForActionNamed( Sheet.class.getName() + "/" + key, query, wocontext.request().isSecure(), 0, false );
    }

    response._appendContentAsciiString( "<link" );
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.