Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send large base64 #64

Open
jason09 opened this issue Jul 24, 2023 · 2 comments
Open

send large base64 #64

jason09 opened this issue Jul 24, 2023 · 2 comments

Comments

@jason09
Copy link

jason09 commented Jul 24, 2023

Hello !
i'm trying to send base64 ( file size: 1MB ) from javascript( web interface) to engine.io-server-java but socket transport get closed.
when trying to send 260 KB, everything worked fine.

i tried to do some stuff as below:

increasing Header size

   `HttpConfiguration httpConfiguration = new HttpConfiguration();
    logger.info("getRequestHeaderSize "+httpConfiguration.getRequestHeaderSize());
    httpConfiguration.setRequestHeaderSize(bufferSize);
    httpConfiguration.setResponseHeaderSize(bufferSize);
    httpConfiguration.setHeaderCacheSize(65534);
    
   ServerConnector serverConnector = new ServerConnector(mServer, new HttpConnectionFactory(httpConfiguration));
    serverConnector.setHost(ip);
    serverConnector.setPort(port);
    serverConnector.setAcceptedSendBufferSize(bufferSize);
    serverConnector.setAcceptedReceiveBufferSize(bufferSize);
    serverConnector.setIdleTimeout(999999999);`

increasing form content and keys size

 ` ServletContextHandler servletContextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
    servletContextHandler.setContextPath("/");
    servletContextHandler.addFilter(RemoteAddrFilter.class, "/socket.io/*", EnumSet.of(DispatcherType.REQUEST));
    servletContextHandler.setMaxFormContentSize(bufferSize);
    servletContextHandler.setMaxFormKeys(bufferSize);
    servletContextHandler.setStopTimeout(999999999);`

Please need someone help

@trinopoty
Copy link
Collaborator

Hi,
Are you using websocket or polling transport?

@jason09
Copy link
Author

jason09 commented Aug 5, 2023

Hi @trinopoty !
i have trried both. i'm using client on browser(javascript) and java for server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants