Bug fixes and other stuff

This commit is contained in:
Ziver Koc 2014-11-06 20:21:29 +00:00
parent a7e6324a10
commit e822a4b35c
7 changed files with 80 additions and 63 deletions

View file

@ -104,7 +104,7 @@ public class HttpHeaderParser {
httpCode = Integer.parseInt( line.substring( 9, 12 ));
}
// Client Request
else{
else if(line.contains("HTTP/")){
type = (line.substring(0, line.indexOf(" "))).trim();
version = Float.parseFloat( line.substring(line.lastIndexOf("HTTP/")+5 , line.length()).trim() );
line = (line.substring(type.length()+1, line.lastIndexOf("HTTP/"))).trim();