Examples of addHeader()


Examples of org.jboss.netty.handler.codec.http.DefaultHttpResponse.addHeader()

                // Reset the cookies if necessary.
                CookieEncoder cookieEncoder = new CookieEncoder(true);
                for (Cookie cookie : cookies) {
                    cookieEncoder.addCookie(cookie);
                }
                response.addHeader(SET_COOKIE, cookieEncoder.encode());
            }
        }

        // Write the response.
        ChannelFuture future = e.getChannel().write(response);
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpChunkTrailer.addHeader()

                    String[] header = splitHeader(line);
                    String name = header[0];
                    if (!name.equalsIgnoreCase(HttpHeaders.Names.CONTENT_LENGTH) &&
                        !name.equalsIgnoreCase(HttpHeaders.Names.TRANSFER_ENCODING) &&
                        !name.equalsIgnoreCase(HttpHeaders.Names.TRAILER)) {
                        trailer.addHeader(name, header[1]);
                    }
                    lastHeader = name;
                }

                line = readHeader(buffer);
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpMessage.addHeader()

                    int lastPos = current.size() - 1;
                    String newString = current.get(lastPos) + line.trim();
                    current.set(lastPos, newString);
                } else {
                    String[] header = splitHeader(line);
                    message.addHeader(header[0], header[1]);
                    lastHeader = header[0];
                }

                line = readHeader(buffer);
            } while (line.length() != 0);
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpRequest.addHeader()

        if (!found) {
            sendError(ctx, NOT_FOUND, e);
            return;
        }
        request.addHeader(SERVICED, "true");

        // Cache Validation
        String ifModifiedSince = request.getHeader(IF_MODIFIED_SINCE);
        if (file != null && ifModifiedSince != null && ifModifiedSince.length() != 0) {
            SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpResponse.addHeader()

                // Reset the cookies if necessary.
                CookieEncoder cookieEncoder = new CookieEncoder(true);
                for (Cookie cookie : cookies) {
                    cookieEncoder.addCookie(cookie);
                }
                response.addHeader(SET_COOKIE, cookieEncoder.encode());
            }
        }

        // Write the response.
        ChannelFuture future = e.getChannel().write(response);
View Full Code Here

Examples of org.jboss.resteasy.security.doseta.DKIMSignature.addHeader()

      Response.ResponseBuilder builder = Response.ok("hello world");
      builder.header("custom", "value");
      DKIMSignature signature = new DKIMSignature();
      signature.setSelector("test");
      signature.setDomain("samplezone.org");
      signature.addHeader("custom");
      builder.header(DKIMSignature.DKIM_SIGNATURE, signature);
      return builder.build();
   }

   /**
 
View Full Code Here

Examples of org.jboss.seam.mock.EnhancedMockHttpServletRequest.addHeader()

      HttpSession session = new MockHttpSession();
      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest(session);
      EnhancedMockHttpServletResponse response = new EnhancedMockHttpServletResponse();

      request.addHeader(ConditionalAbstractResource.HEADER_IF_NONE_MATCH, "\"1234\", \"5678\"");

      ConditionalAbstractResource resource = new ConditionalAbstractResource()
      {
         public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
         {
View Full Code Here

Examples of org.jboss.soa.esb.http.HttpResponse.addHeader()

        Header[] responseHeaders = method.getResponseHeaders();
        for(Header responseHeader : responseHeaders) {
          String name = responseHeader.getName();
          String value = responseHeader.getValue();
            response.addHeader(new org.jboss.soa.esb.http.HttpHeader(name, value));
            // JBESB-2511
            new ResponseHeader(name, value).setPropertyNameThis(properties);
        }
        // JBESB-2761
        if (httpResponseStatusEnabled) {
View Full Code Here

Examples of org.jgroups.auth.sasl.SaslClientContext.addHeader()

                SaslClientContext ctx = null;
                Address remoteAddress = msg.getDest();
                try {
                    ctx = new SaslClientContext(saslClientFactory, mech, server_name != null ? server_name : remoteAddress.toString(), client_callback_handler, sasl_props, client_subject);
                    sasl_context.put(remoteAddress, ctx);
                    ctx.addHeader(msg, null);
                } catch (Exception e) {
                    if (ctx != null) {
                        disposeContext(remoteAddress);
                    }
                    throw new SecurityException(e);
View Full Code Here

Examples of org.jinstagram.auth.model.OAuthRequest.addHeader()

    request.setConnectTimeout(config.getConnectionTimeoutMills(), TimeUnit.MILLISECONDS);
    request.setReadTimeout(config.getReadTimeoutMills(), TimeUnit.MILLISECONDS);
   
        if (enforceSignatrue != null) {
            request.addHeader(EnforceSignedHeaderUtils.ENFORCE_SIGNED_HEADER, enforceSignatrue);
        }
   
   
    // Additional parameters in url
    if (params != null) {
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.