|
|
|
@ -84,9 +84,10 @@ public class sigServer { |
|
|
|
|
if (boundary.length()>0) { |
|
|
|
|
if (line.equals(boundary)) { |
|
|
|
|
truncateUntilBoundary=true; |
|
|
|
|
System.out.println("Boundary found."); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else |
|
|
|
|
} else { |
|
|
|
|
if (line.contains("Content-Disposition: ")||line.contains("Content-Type: ")) { |
|
|
|
|
if (line.contains("filename=")) { |
|
|
|
|
filename=line.substring(line.indexOf("filename=")+"filename=".length()+1); |
|
|
|
@ -151,14 +152,14 @@ public class sigServer { |
|
|
|
|
filename=null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (line.contains("Content-Length: ")) { |
|
|
|
|
expectedDataLength=Integer.parseInt(line.substring("Content-Length: ".length())); |
|
|
|
|
System.out.println("Expecting a length of "+expectedDataLength); |
|
|
|
|
} |
|
|
|
|
if (line.contains("Content-Type:")) { |
|
|
|
|
if (line.contains("Content-Type: multipart/form-data; boundary=")) { |
|
|
|
|
boundary=line.substring("Content-Type: multipart/form-data; boundary=".length()); |
|
|
|
|
System.out.println("Boundary set to "+boundary); |
|
|
|
|
boundary="--"+line.substring("Content-Type: multipart/form-data; boundary=".length()); |
|
|
|
|
} else |
|
|
|
|
if (line.contains("application/json")){ |
|
|
|
|
isApplication=true; |
|
|
|
|