JDK-4635350 : HTTP POST writes should be flushed when Content Length is set
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.3.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-02-08
  • Updated: 2002-10-30
  • Resolved: 2002-10-30
Related Reports
Duplicate :  
Description

Name: nt126004			Date: 02/08/2002


FULL PRODUCT VERSION :
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
Java HTTP implementation naively caches entire stream for
an HTTP POST in a byte buffer *even* when the Content
Length header has been provided.  Bug 4212479 was closed
with the explanation that this must be done to provide HTTP
1.0 compatibility, but this could be done by simply
trusting the Content Length value when one is provided and
not buffering in this case.

This is a serious issue for large (100's of MB and >1GB in
cases) files!  Also, it makes Java look rather stupid
during progress metered small uploads.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.See bug 4212479 plus set the Content Length header.

This bug can be reproduced always.

CUSTOMER WORKAROUND :
None other than to replace the standard HTTP
implementation -- which is a complete mess in (what are
intended to be) lightweight applets!
(Review ID: 138513) 
======================================================================

Comments
EVALUATION This issue will be addressed by the new http client targetted for tiger. ###@###.### 2002-02-19
19-02-2002