Fixed file upload

This commit is contained in:
Ziver Koc 2016-07-14 17:50:39 +02:00
parent 8ad285cd61
commit 99973b7c98
8 changed files with 61 additions and 51 deletions

View file

@ -176,11 +176,11 @@ public class HttpServer extends ThreadedTCPNetworkServer{
header.getHeader("Content-Type") != null &&
header.getHeader("Content-Type").contains("application/x-www-form-urlencoded")) {
// Reads the post data size
int post_data_length = Integer.parseInt(header.getHeader("Content-Length"));
int postDataLength = Integer.parseInt(header.getHeader("Content-Length"));
// read the data
StringBuilder tmpBuff = new StringBuilder();
// read the data
for (int i = 0; i < post_data_length; i++) {
for (int i = 0; i < postDataLength; i++) {
tmpBuff.append((char) in.read());
}
// get the variables