Examples of RequestWrapper


Examples of org.apache.http.impl.client.RequestWrapper

        }
    }

    private HttpRequest upgradeRequestTo(HttpRequest request, ProtocolVersion version)
            throws ProtocolException {
        RequestWrapper newRequest = new RequestWrapper(request);
        newRequest.setProtocolVersion(version);

        return newRequest;
    }
View Full Code Here

Examples of org.apache.http.impl.client.RequestWrapper

        return newRequest;
    }

    private HttpRequest downgradeRequestTo(HttpRequest request, ProtocolVersion version)
            throws ProtocolException {
        RequestWrapper newRequest = new RequestWrapper(request);
        newRequest.setProtocolVersion(version);

        return newRequest;
    }
View Full Code Here

Examples of org.apache.http.impl.client.RequestWrapper

        HttpRequest downgraded = new BasicHttpRequest("GET", "/foo", HTTP_1_1);
        downgraded.removeHeaders("Connection");
        downgraded.addHeader("X-Unknown-Header", "some-value");

        RequestWrapper downgradedWrapper = new RequestWrapper(downgraded);

        EasyMock.expect(
                mockBackend.execute(EasyMock.isA(HttpHost.class), eqRequest(downgradedWrapper),
                        (HttpContext) EasyMock.isNull())).andReturn(originResponse);
        replayMocks();
View Full Code Here

Examples of org.apache.http.impl.client.RequestWrapper

                    }

                });
            }
            this.params = new ClientParamsStack(null, this.clientParams, request.getParams(), null);
            RequestWrapper wrapper = wrapRequest(request);
            wrapper.setParams(this.params);
            HttpRoute route = determineRoute(target, wrapper, this.localContext);
            this.mainRequest = new RoutedRequest(wrapper, route);
            this.requestContentProduced = false;
            requestConnection();
        } catch (Exception ex) {
View Full Code Here

Examples of org.apache.http.impl.client.RequestWrapper

    private RequestWrapper wrapRequest(final HttpRequest request) throws ProtocolException {
        if (request instanceof HttpEntityEnclosingRequest) {
            return new EntityEnclosingRequestWrapper((HttpEntityEnclosingRequest) request);
        } else {
            return new RequestWrapper(request);
        }
    }
View Full Code Here

Examples of org.apache.wink.server.internal.log.Requests.RequestWrapper

        final HandlersChain chain = mockContext.mock(HandlersChain.class);

        final HttpServletRequestWrapper requestWrapper =
            mockContext.mock(HttpServletRequestWrapper.class);
        final Sequence normalSequence = mockContext.sequence("normalSequence");
        final RequestWrapper wrapper = mockContext.mock(RequestWrapper.class);
        final LoggedServletInputStream inputStream =
            mockContext.mock(LoggedServletInputStream.class);
        final UriInfo uriInfo = mockContext.mock(UriInfo.class);
        final HttpHeaders headers = mockContext.mock(HttpHeaders.class);
View Full Code Here

Examples of org.exist.http.servlets.RequestWrapper

    // get parameters
    final String uploadParamName = args[0].getStringValue();

    final JavaObjectValue value = (JavaObjectValue) var.getValue().itemAt(0);
    if (value.getObject() instanceof RequestWrapper) {
      final RequestWrapper request = (RequestWrapper)value.getObject();
      final List<String> fnames = request.getUploadedFileName(uploadParamName);
      if(fnames == null) {
        return Sequence.EMPTY_SEQUENCE;
      }
      final ValueSequence result = new ValueSequence();
      for (final String name: fnames) {
View Full Code Here

Examples of org.exist.http.urlrewrite.XQueryURLRewrite.RequestWrapper

        expect(mockHttpServletRequest.getParameterMap()).andReturn(testParameterMap);


        replay(mockHttpServletRequest);
        RequestWrapper wrapper = new RequestWrapper(mockHttpServletRequest);
        verify(mockHttpServletRequest);

        assertEquals(testParameterMap.size(), wrapper.getParameterMap().size());

        for(String paramName : testParameterMap.keySet()) {
            assertArrayEquals(testParameterMap.get(paramName), wrapper.getParameterMap().get(paramName));
        }
    }
View Full Code Here

Examples of org.hdiv.filter.RequestWrapper

      MultipartRequestWrapper wrapper = (MultipartRequestWrapper) request;
      ServletRequest origRequest = wrapper.getRequest();
      if (origRequest != null && origRequest instanceof RequestWrapper) {

        RequestWrapper requestWrapper = (RequestWrapper) origRequest;

        Boolean maxLengthExceeded = (Boolean) request.getAttribute(ATTRIBUTE_MAX_LENGTH_EXCEEDED);
        if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue())) {
          return;
        }

        HdivMultipartException multipartException = (HdivMultipartException) request
            .getAttribute(IMultipartConfig.FILEUPLOAD_EXCEPTION);
        if (multipartException != null) {
          Exception orig = multipartException.getOriginal();
          log.error("Failed to parse multipart request", orig);
          if (orig instanceof ServletException) {
            throw (ServletException) orig;
          } else {
            throw new ServletException("Failed to parse multipart request", orig);
          }
        }

        // file items
        Map<String, Object> items = requestWrapper.getFileElements();

        for (Object fileItem : items.values()) {
          if (items != null) {
            addFileParameter((List) fileItem);
          }
        }

        // text items
        items = requestWrapper.getTextElements();

        for (String currentTextKey : items.keySet()) {

          String[] currentTextValue = (String[]) items.get(currentTextKey);
          this.addTextParameter(wrapper, currentTextKey, currentTextValue);
View Full Code Here

Examples of org.wymiwyg.wrhapi.util.RequestWrapper

        }
        if (!principalFound) {
          throw new AccessControlException(
              "requested login not in principals-set");
        }
        return new RequestWrapper(request) {
          public RequestURI getRequestURI() throws HandlerException {
            return new RequestURIWrapper(super.getRequestURI()) {
              public String[] getParameterNames() {
                String[] superResult = super
                    .getParameterNames();
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.