mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
8190793: Httpserver does not detect truncated request body
Reviewed-by: chegar, dfuchs
This commit is contained in:
parent
2060b8fc57
commit
62d9659c87
3 changed files with 134 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -135,6 +135,8 @@ class ChunkedInputStream extends LeftOverInputStream {
|
|||
needToReadHeader = true;
|
||||
consumeCRLF();
|
||||
}
|
||||
if (n < 0 && !eof)
|
||||
throw new IOException("connection closed before all data received");
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -60,6 +60,8 @@ class FixedLengthInputStream extends LeftOverInputStream {
|
|||
t.getServerImpl().requestCompleted (t.getConnection());
|
||||
}
|
||||
}
|
||||
if (n < 0 && !eof)
|
||||
throw new IOException("connection closed before all data received");
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue