This is the mail archive of the java-prs@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java.net/170: HTTP client code treats headers as body



>Number:         170
>Category:       java.net
>Synopsis:       HTTP client code treats headers as body
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    warrenl
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 09 11:00:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     francis@ecal.com
>Release:        libgcj-2.95.2
>Organization:
>Environment:
RedHat 6.1
>Description:
If I open an HTTP connection, and read from the input
stream, I don't just get the body of the response; I
get the headers, too.  The only way around this is to
ask for the headers first, and then read from the stream.
>How-To-Repeat:
The attached tarfile contains a patch and a Java source
file (DemonstrateChunked.java).  Compile and run
DemonstrateChunked.java; it will make an HTTP request
and then print out what it reads from the input
stream; you will see the status line and headers before
the body of the resource.
>Fix:
Apply the patch included in the tarfile.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-tar; name="headers.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="headers.tar.gz"

H4sICJX0xzgAA2hlYWRlcnMudGFyAO1WbW/bNhDOV+lXXP0l8mzrxbKt2IGBdMmGBmjQYt0+ZcFA
S5TFRiYFikoWFPnvO1LyS1q02YZ2wwY+Hyz6jrx77kg91AXdCF4rSRQ9Lxp+SzP/PbkjR18TYRSG
s8nkKEQks+1zap6IaDINj8IknEXJLBmPcRxNY3RD+FVZfAZNrYgEOMol4SmrPzvvOf9/FGxTCalA
77nPqfK/O3UPTUxoi1s1q5KlkJakruHikyMDH1xAdLOwoQofd4JlsCGMe++UZHwNRK7r65u+mfrB
dX756TU0ssTojpIP2qIdaFlyeg/o9XqFUtUiCJBQ5UtaUyLTwqcpKf1UbIJsz8Oviiru9U9d5xFS
otICvF1FV6TMhdzQDEP+8HtKK8UER2Jl3t8mffdQK7rxqZR+hVRVyb3ebpmmsoDeQK/w11Rd0bom
a+r1dTq9WlLVSK5zYykXRJFLXjUKi6ZkA4x/VCBGOxec09TQSHG4xJp9UVG+t3vb2IehfmN8qedr
Egf23Vx06859xMDDZU8ac/lm3wUmvtiDc8KPFeRUr+u6gAfi2R50+10yTk+f1H5fsJKC52nPknHc
U5K9xjHGebHkTVn2XcfpiIhG7Yjo+X+hhsOlXQ06kyEEuRSbP1+M/vvoPp66//Z7+q1QYGOorEeV
buw3yvGc/ifjaaf/Wv7RH8VxEln9/ycwGo3wvVit0/ejsT+f+tFISLYO0KQFNFjzJkBfUEmhRCrK
QEtysBcq87Hg/Fw08LKSEE0hShZxvIhPIJrP5+5gMHga/W8EvtLbM4coXkxPFmEEYzwy7tkZjKI4
GZ7AQD8SODtzwbytwHLwXkAmjAa2tw1CFVLcg9bHt13GnYJsNUJL8BPBxUhdGGA15KSsqb5jRtss
qybPqaTZJYflElr9GrXpDl0m6/c7w16Za5HefiLmmGCgI6D9FbbkVft+apGHvTYdxDd2FCrTkvEk
Gc5gMJ7MhnPTEsNFiJISDmuheIl0TCFduNWDotc3gJra0jT/o5vOmxbX4Q16PG3uw/Gv/BjZtfy2
UVn9I5O1WirZUO2EA6HXtt0O4DeCEwRwXtD0FvBqhZLmStxRaZK2uswFH+ksQHKFDoIp5bHfljab
mdJmJ8MoNrU5bdxHM9K/Rt+XrcwPTDntTaQ3agjhEFjf0Hf05nW8+4Cc6ltW4Qmh5tOlqU0EnNay
HjjOtsauc2gxN1ivZ8Z4JyvGTfVOR6gt9aWhb9qGF/1mJfCKzhheYbQ22SjPQORm2MowWvC29NvV
lzkwBfekNnewaHg2hPQhxb6uCHZQH+hmXZjVpRAVEIxGKjzD2f/2srKwsLCwsLCwsLCwsLCwsLCw
sLCwsLCwsLCwsPgi/gAFPIQeACgAAA==

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]