protected void storeInitialLocation(final HttpServerExchange exchange, byte[] bytes, int contentLength) {
        if(!saveOriginalRequest) {
            return;
        }
        final ServletRequestContext servletRequestContext = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
        HttpSessionImpl httpSession = servletRequestContext.getCurrentServletContext().getSession(exchange, true);
        Session session;
        if (System.getSecurityManager() == null) {
            session = httpSession.getSession();
        } else {
            session = AccessController.doPrivileged(new HttpSessionImpl.UnwrapSessionAction(httpSession));
        }
        SessionManager manager = session.getSessionManager();
        if (seenSessionManagers.add(manager)) {
            manager.registerSessionListener(LISTENER);
        }
        session.setAttribute(SESSION_KEY, RedirectBuilder.redirect(exchange, exchange.getRelativePath()));
        if(bytes == null) {
            SavedRequest.trySaveRequest(exchange);
        } else {
            SavedRequest.trySaveRequest(exchange, bytes, contentLength);
        }
    }
protected void storeInitialLocation ( final HttpServerExchange exchange , byte [ ] bytes , int contentLength ) { if ( ! saveOriginalRequest ) { return ; } final ServletRequestContext servletRequestContext = exchange . getAttachment ( ServletRequestContext . ATTACHMENT_KEY ) ; HttpSessionImpl httpSession = servletRequestContext . getCurrentServletContext ( ) . getSession ( exchange , true ) ; Session session ; if ( System . getSecurityManager ( ) == null ) { session = httpSession . getSession ( ) ; } else { session = AccessController . doPrivileged ( new HttpSessionImpl . UnwrapSessionAction ( httpSession ) ) ; } SessionManager manager = session . getSessionManager ( ) ; if ( seenSessionManagers . add ( manager ) ) { manager . registerSessionListener ( LISTENER ) ; } session . setAttribute ( SESSION_KEY , RedirectBuilder . redirect ( exchange , exchange . getRelativePath ( ) ) ) ; if ( bytes == null ) { SavedRequest . trySaveRequest ( exchange ) ; } else { SavedRequest . trySaveRequest ( exchange , bytes , contentLength ) ; } }
This method doesn't save content of request but instead uses data from parameter.
This should be used in case that data from request was already read and therefore it is not possible to save them.

@param exchange
@param bytes
@param contentLength