Skip to content

Commit

Permalink
Update HTTP.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyborgscode authored Sep 26, 2024
1 parent 691ae78 commit b010086
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions io/HTTP.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,21 @@ static private String readPage(Socket socket, boolean header) throws IOException
// System.out.println("readPage: pre read " + dis.available() );

if ( dis.available() > 0 || firstread ) {
got = dis.read(buffer,offset,len-offset);

got = dis.read(buffer,offset,len-offset);
// System.out.println("readPage: read = "+got);
offset += got;

firstread = false;

if ( offset == len ) {
if ( offset >= len ) {

result += new String(buffer);
offset = 0;
}
} else break;

} while ( got > 0 );
} while ( got > 0);

// System.out.println("readPage: finish reading normally");

Expand Down

0 comments on commit b010086

Please sign in to comment.