List of usage examples for io.netty.handler.codec.http ServerCookieEncoder encode
@Deprecated public static String encode(String name, String value)
From source file:com.soho.framework.server.servlet.interceptor.HttpSessionInterceptor.java
License:Apache License
@Override public void onRequestSuccessed(ChannelHandlerContext ctx, HttpRequest request, HttpResponse response) { HttpSession s = HttpSessionThreadLocal.get(); if (s != null && !this.sessionRequestedByCookie) { HttpHeaders.addHeader(response, SET_COOKIE, ServerCookieEncoder.encode(HttpSessionImpl.SESSION_ID_KEY, s.getId())); }/*from w w w . j a v a2 s. c om*/ }
From source file:net.javaforge.netty.servlet.bridge.interceptor.HttpSessionInterceptor.java
License:Apache License
@Override public void onRequestSuccessed(ChannelHandlerContext ctx, HttpRequest request, HttpResponse response) { HttpSessionImpl s = HttpSessionThreadLocal.get(); if (s != null && !this.sessionRequestedByCookie) { HttpHeaders.addHeader(response, SET_COOKIE, ServerCookieEncoder.encode(HttpSessionImpl.SESSION_ID_KEY, s.getId())); }/*w w w . j a va 2 s. c om*/ }
From source file:org.wso2.gw.emulator.http.consumer.HttpResponseProcessor.java
License:Open Source License
private void populateCookies(FullHttpResponse response, OutgoingMessage outgoing) { if (outgoing.getCookies() != null) { for (Cookie cookie : outgoing.getCookies()) { response.headers().add(HttpHeaders.Names.SET_COOKIE, ServerCookieEncoder.encode(cookie.getName(), cookie.getValue())); }/* w ww. ja v a 2s . co m*/ } }
From source file:org.wso2.gw.emulator.http.server.processors.HttpResponseProcessor.java
License:Open Source License
private void populateCookies(FullHttpResponse response, HttpServerResponseBuilderContext responseContext) { if (responseContext.getCookies() != null) { for (Cookie cookie : responseContext.getCookies()) { response.headers().add(HttpHeaders.Names.SET_COOKIE, ServerCookieEncoder.encode(cookie.getName(), cookie.getValue())); }//from ww w . j a v a 2s . co m } }