Remove a cookie from the response

@param subject
@param resp
191961
@Override
    public void removeSSOCookieFromResponse(HttpServletResponse resp) {
        if (resp instanceof com.ibm.wsspi.webcontainer.servlet.IExtendedResponse) {
            ((com.ibm.wsspi.webcontainer.servlet.IExtendedResponse) resp).removeCookie(getSSOCookiename());
            removeJwtSSOCookies((com.ibm.wsspi.webcontainer.servlet.IExtendedResponse) resp);
        }
    }
774251
public void logout(Subject subject) {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
			SibTr.entry(tc, CLASS_NAME + "logout");
		}
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
			SibTr.exit(tc, CLASS_NAME + "logout");
		}
	}
238819
def delete_cookie(self, key: str, path: str='/', domain: Optional[str]=None) -> None:
        """"""
        self.set_cookie(key, expires=datetime.utcnow(), max_age=0, path=path, domain=domain)
863584
public static void clearCookie (HttpServletResponse rsp, String name)
    {
        Cookie c = new Cookie(name, "x");
        c.setPath("/");
        c.setMaxAge(0);
        rsp.addCookie(c);
    }
580715
private static SubjectCookie setInvocationSubject(Subject s) {
        final SubjectCookie cookie = new SubjectCookie();
        SubjectManagerService sms = smServiceRef.getService();
        if (sms != null) {
            if (s == null) {
                s = new Subject();
            }

            Subject currentInvocationSubject = sms.getInvocationSubject();
            sms.setInvocationSubject(s);

            cookie.subject = currentInvocationSubject;

            // If SYNC-TO-OS-THREAD support is enabled for the server and configured for this app,
            // then sync the Subject's identity to the thread.  The returned token is handed back
            // to the ThreadIdentityManager when we restore of the previous invocation subject
            // (under restoreInvocationSubject).
            try {
                cookie.token = ThreadIdentityManager.setAppThreadIdentity(s);
            } catch (ThreadIdentityException e) {
                throw new SecurityException(e);
            }
        }
        return cookie;
    }
394940
public void invalidateReferrerURLCookie(HttpServletRequest req, HttpServletResponse res, String cookieName) {
        invalidateCookie(req, res, cookieName, true);
    }
670694
public static boolean removeCookie(Cookie cookie, HttpServletResponse response) {
        if (Checker.isNotNull(cookie)) {
            cookie.setMaxAge(0);
            return addCookie(cookie, response);
        }
        return false;
    }
621603
public void removeRequestUrlAndParameters(HttpServletRequest request, HttpServletResponse response) {
        ReferrerURLCookieHandler referrerURLCookieHandler = getCookieHandler();
        referrerURLCookieHandler.invalidateReferrerURLCookie(request, response, ReferrerURLCookieHandler.REFERRER_URL_COOKIENAME);

        WebAppSecurityConfig webAppSecConfig = getWebAppSecurityConfig();
        if (isPostDataSavedInCookie(webAppSecConfig)) {
            deleteCookie(request, response, PostParameterHelper.POSTPARAM_COOKIE, webAppSecConfig);
        } else {
            removePostParameterSessionAttributes(request);
        }
    }
606164
@Sensitive
    public static void clearCookie(HttpServletRequest req, HttpServletResponse res, String cookieName, Cookie[] cookies) {
        Cookie existing = getCookie(cookies, cookieName);
        if (existing != null) {
            Cookie c = new Cookie(cookieName, "");

            String path = existing.getPath();
            if (path == null)
                path = "/";
            c.setPath(path);

            c.setMaxAge(0);

            //c.setHttpOnly(existing.isHttpOnly());
            c.setSecure(existing.getSecure());

            res.addCookie(c);
        }

    }
177746
public void sendRemove(String baseURI, Resource subject,URI predicate, Value object, Resource... contexts) throws MarkLogicSesameException {
		if (DELETE_CACHE_ENABLED) {
			timerDeleteCache.add(subject, predicate, object, contexts);
		} else {
			if (WRITE_CACHE_ENABLED)
				sync();
			getClient().performRemove(baseURI, (Resource) skolemize(subject), (URI) skolemize(predicate), skolemize(object), this.tx, contexts);
		}
	}
753550
public void copyToResponse(HttpServletResponse response, byte[] alteredResponse) throws IOException {
        // character encoding
        if(this.characterEncoding != null) {
            response.setCharacterEncoding(this.characterEncoding);
        }

        // charset
        if(this.charset != null) {
            response.setCharacterEncoding(charset);
        }

        // content type
        if(this.contentType != null) {
            response.setContentType(this.contentType);
        }

        // set the status
        if(this.statusCode > 0) {
            response.setStatus(this.statusCode);
        }

        // set the locale
        if(this.locale != null) {
            response.setLocale(this.locale);
        }

        // copy and add all cookies
        if(this.cookies != null) {
            for(Cookie cookie : this.cookies) {
                response.addCookie(cookie);
            }
        }

        // copy the byte array stream and also set its length
        final OutputStream finalOut = response.getOutputStream();
        if(alteredResponse == null) {
            int length = this.outputStream.getLength();
            response.setContentLength(length);

            // write the entire byte chunk
            this.outputStream.getByteArrayOutputStream().writeTo(finalOut);
        } else {
            response.setContentLength(alteredResponse.length);
            finalOut.write(alteredResponse);
        }

        finalOut.flush();
    }
389128
@Override
    public void removeCookie(HttpCookie cookie) {
        this.message.removeCookie(cookie.getName(), HttpHeaderKeys.HDR_SET_COOKIE);
    }
930091
def handle_cookies(response, exc=None):
    '''
    '''
    if exc:
        return
    headers = response.headers
    request = response.request
    client = request.client
    response._cookies = c = SimpleCookie()
    if 'set-cookie' in headers or 'set-cookie2' in headers:
        for cookie in (headers.get('set-cookie2'),
                       headers.get('set-cookie')):
            if cookie:
                c.load(cookie)
        if client.store_cookies:
            client.cookies.extract_cookies(response, request)
715560
function(req, res, response) {

  if (response.status === 302) {
    var location = response.headers.location;
    delete response.headers.location;
    res.set(response.headers);
    res.redirect(location);
  } else {
    res.set(response.headers);
    res.status(response.status).send(response.body);
  }
}
888312
def handleResponse(self, resp):
        """"""
        id=resp["id"]
        evt = self.respEvents[id]
        del(self.respEvents[id])
        evt.handleResponse(resp)
274689
def delete_cookie(self, key, path='/', domain=None):
        
        self.set_cookie(key, value='', max_age=0, path=path, domain=domain,
                        expires=datetime.utcfromtimestamp(0))
1173202
void setHTTPResponse(HTTPResponse resp) {
        lock.lock();
        try {
            if (response != null) {
                throw(new IllegalStateException(
                        "HTTPResponse was already set"));
            }
            response = resp;
            ready.signalAll();
        } finally {
            lock.unlock();
        }
    }