I was making a HTTPS server in java from scratch for my school project, and I encountered an error.
I put an upload feature for users and it sends data using multipart/form-data. The problem is that any request over 16384 bytes cannot be fully read, SSLSocket.available() always return 16384, ignoring the rest of the request.
I know that the problem is that DataInputStream.read() doesn't read 'all' packets, SSL buffers the data to 16384 bytes each and sends every packet followed by ACK. Is there any read function that can read continuously from the socket so that it can read the whole packet?
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)