Examples of addHeader()


Examples of org.jvnet.glassfish.comms.clb.proxy.http.util.HttpRequest.addHeader()

            remoteEndpoint.setLocal(true);
           
            ret = false;
        } else {
            remoteEndpoint = new DefaultEndpoint(remoteHost);
            httpReq.addHeader(LoadBalancerProxyConstants.HTTP_PROXY_HEADER,
                    remoteHost.getAddress().toString());
        }
       
        if (_logger.isLoggable(Level.FINEST)) {
            httpReq.dump();
View Full Code Here

Examples of org.mule.transport.http.HttpResponse.addHeader()

            }

            // Ensure there's a content type header
            if (!response.containsHeader(HttpConstants.HEADER_CONTENT_TYPE))
            {
                response.addHeader(new Header(HttpConstants.HEADER_CONTENT_TYPE,
                        HttpConstants.DEFAULT_CONTENT_TYPE));
            }

            // Ensure there's a content length or transfer encoding header
            if (!response.containsHeader(HttpConstants.HEADER_CONTENT_LENGTH)
View Full Code Here

Examples of org.neo4j.smack.pipeline.http.HttpHeaderContainer.addHeader()

    @Test
    public void testAssignAndClear() {
        HttpHeaderContainer headers = new HttpHeaderContainer();
       
        headers.addHeader(HttpHeaderNames.CONTENT_LENGTH, new MutableString("0"));
        assertThat(headers.getHeaders(HttpHeaderNames.CONTENT_LENGTH).size(), is(1));
       
        headers.clear();
       
        assertThat(headers.getHeaders(HttpHeaderNames.CONTENT_LENGTH).size(), is(0));
View Full Code Here

Examples of org.olat.core.gui.control.generic.tool.ToolController.addHeader()

    // 1) administrative tools
    if (isCourseAdmin || isCourseCoach || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)
        || hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT) || hasCourseRight(CourseRights.RIGHT_ARCHIVING)
        || hasCourseRight(CourseRights.RIGHT_ASSESSMENT)) {
      myTool.addHeader(translate("header.tools"));
      if (hasCourseRight(CourseRights.RIGHT_COURSEEDITOR) || isCourseAdmin) {
        myTool.addLink(COMMAND_EDIT, translate("command.openeditor"));
      }
      if (hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT) || isCourseAdmin) {
        myTool.addLink("groupmngt", translate("command.opengroupmngt"));
View Full Code Here

Examples of org.openqa.jetty.html.Page.addHeader()

            return;
        }
       
        Page page= new Page();
        page.title(getServletInfo());
        page.addHeader("");
        page.attribute("text","#000000");
        page.attribute(Page.BGCOLOR,"#FFFFFF");
        page.attribute("link","#606CC0");
        page.attribute("vlink","#606CC0");
        page.attribute("alink","#606CC0");
View Full Code Here

Examples of org.owasp.webscarab.model.Request.addHeader()

          request.read(_clientIn, _base);
          if (request.getMethod() == null || request.getURL() == null) {
            return;
          }
          if (proxyAuth != null) {
            request.addHeader("Proxy-Authorization", proxyAuth);
          }
        }
        if (from != null) {
          request.addHeader("X-Forwarded-For", from);
        }
View Full Code Here

Examples of org.owasp.webscarab.model.Response.addHeader()

                if (_ui != null) {
                    request = response.getRequest();
                    response = _ui.editResponse(request, response);
                    if (response == null) throw new IOException("Response aborted in Manual Edit");
                    if (response.getRequest() == null) response.setRequest(request);
                    response.addHeader("X-ManualEdit", "possibly modified");
                }
            }
            return response;
        }
       
View Full Code Here

Examples of org.picketlink.test.identity.federation.bindings.mock.MockCatalinaRequest.addHeader()

        MockCatalinaContextClassLoader mclIDP = setupTCL(profile + "/idp");
        Thread.currentThread().setContextClassLoader(mclIDP);

        MockCatalinaRequest request = new MockCatalinaRequest();
        request.addHeader("Referer", "http://localhost:8080/employee/");

        request.setParameter(GeneralConstants.USERNAME_FIELD, "anil");
        request.setParameter(GeneralConstants.PASS_FIELD, "anil");

        MockCatalinaResponse response = new MockCatalinaResponse();
View Full Code Here

Examples of org.picketlink.test.identity.federation.web.mock.MockHttpServletRequest.addHeader()

        List<String> rolesList = new ArrayList<String>();
        rolesList.add("manager");
        session.setAttribute(GeneralConstants.ROLES_ID, rolesList);

        MockHttpServletRequest request = new MockHttpServletRequest(session, "POST");
        request.addHeader("Referer", sales);

        String samlMessage = Base64.encodeBytes(createLogOutRequest(sales).getBytes());
        session.setAttribute("SAMLRequest", samlMessage);

        MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

Examples of org.scribe.model.OAuthRequest.addHeader()

        this.computeBody(bodyMap);
    }

    public OAuthRequest getRequest() {
        OAuthRequest request = new OAuthRequest(originalRequest.getVerb(), originalRequest.getUrl());
        request.addHeader("Authorization", originalRequest.getHeaders().get("Authorization"));
        request.addHeader("Content-Type", "multipart/form-data, boundary=" + boundary);
        request.addHeader("Content-length", bodyLength.toString());
        request.addPayload(complexPayload());
        return request;
    }
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.