Examples of addHeader()


Examples of org.apache.tapestry5.services.Response.addHeader()

       
        replay();
   
        for (String value : HEADER_VALUES)
        {
            response.addHeader(HEADER_NAME, value);
        }
       
        verify();
       
    }
View Full Code Here

Examples of org.apache.tomcat.spdy.SpdyFrame.addHeader()

            mb.toBytes();
            bc = mb.getByteChunk();
            rframe.headerValue(bc.getBuffer(), bc.getStart(), bc.getLength());
        }
        if (response.getStatus() == 0) {
            rframe.addHeader(SpdyFrame.STATUS, SpdyFrame.OK200);
        } else {
            // HTTP header contents
            String message = null;
            if (org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER
                    && HttpMessages.isSafeInHttpHeader(response.getMessage())) {
View Full Code Here

Examples of org.apache.wicket.request.http.WebResponse.addHeader()

      {
        checkHeaderAccess(name);

        for (String value : headers.getHeaderValues(name))
        {
          webResponse.addHeader(name, value);
        }
      }

      // 6. Flush the response
      flushResponseAfterHeaders(webResponse);
View Full Code Here

Examples of org.apache.wink.common.model.multipart.OutPart.addHeader()

        BufferedOutMultiPart bomp = new BufferedOutMultiPart();
        bomp.setBoundary(bounary);
        assertEquals(bomp.getBoundary(), bounary);
        OutPart op = new OutPart();

        op.addHeader("nAme", "value");
        assertEquals(op.getHeaders().getFirst("NaMe"), "value");
        op.setContentType(MediaType.TEXT_PLAIN);
        op.setBody(body);
        bomp.addPart(op);
View Full Code Here

Examples of org.apache.wink.test.mock.MockHttpServletRequestWrapper.addHeader()

        // headers
        mockRequest.setMethod(WebDAVMethod.PROPFIND.name());
        mockRequest.setRequestURI(requestURI);
        mockRequest.setContentType(MediaType.APPLICATION_XML);
        if (depth >= 0) {
            mockRequest.addHeader(WebDAVHeaders.DEPTH, String.valueOf(depth));
        }
        // body
        StringWriter writer = new StringWriter();
        Propfind.marshal(propfind, writer);
        mockRequest.setContent(writer.toString().getBytes());
View Full Code Here

Examples of org.apache.wss4j.common.ext.Attachment.addHeader()

            String outputString = XMLUtils.PrettyDocumentToString(signedDoc);
            LOG.debug(outputString);
        }

        try {
            attachment.addHeader(AttachmentUtils.MIME_HEADER_CONTENT_DESCRIPTION, "Kaputt");
            verify(signedDoc, new CallbackHandler() {
                @Override
                public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
                    if (callbacks[0] instanceof AttachmentRequestCallback) {
                        AttachmentRequestCallback attachmentRequestCallback = (AttachmentRequestCallback) callbacks[0];
View Full Code Here

Examples of org.arch.event.http.HTTPRequestEvent.addHeader()

    clone.method = req.method;
    clone.url = req.url;
    clone.setHash(req.getHash());
    for (KeyValuePair<String, String> h : req.headers)
    {
      clone.addHeader(h.getName(), h.getValue());
    }
    return clone;
  }
 
  public void asyncGet(HTTPRequestEvent req, RangeCallback cb)
View Full Code Here

Examples of org.ardverk.dht.storage.message.Context.addHeader()

    Set<KUID> dst = new TreeSet<KUID>();
    Key key = KeyFactory.parseKey("ardverk:///hello/world");
    for (int i = 0; i < count; i++) {
      KUID valueId = KUID.createRandom(key.getId());
      Context context = new Context();
      context.addHeader("X-Index", Integer.toString(i));
     
      index.add(key, context, valueId);
      dst.add(valueId);
    }
   
View Full Code Here

Examples of org.asynchttpclient.RequestBuilder.addHeader()

        AsyncHttpClient c = getAsyncHttpClient(null);
        try {
            RequestBuilder builder2 = new RequestBuilder("GET");
            builder2.setFollowRedirect(true);
            builder2.setUrl("http://www.google.com/");
            builder2.addHeader("Content-Type", "text/plain");
            builder2.addCookie(new Cookie("evilcookie", "test", "test", ".google.com", "/", -1L, 10, false, false));
            Request request2 = builder2.build();
            Response response = c.executeRequest(request2).get();

            assertNotNull(response);
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResponse.addHeader()

                String javascriptVersion = request.getHeader(HeaderConfig.X_ATMOSPHERE_FRAMEWORK);
                int version = parseVersion(javascriptVersion.split("-")[0]);
                if (version < 221) {
                    logger.error("Invalid Atmosphere Version {}", javascriptVersion);
                    response.setStatus(501);
                    response.addHeader(X_ATMOSPHERE_ERROR, "Atmosphere Protocol version not supported.");
                    try {
                        response.flushBuffer();
                    } catch (IOException e) {
                    }
                    return Action.CANCELLED;
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.