This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: HTT URLConnection.getInputStream seems broken in cvs
- From: "Phil Shaw" <phil at mkdoc dot com>
- To: Fabio Roger <fabioroger at gmail dot com>
- Cc: gcj <java at gcc dot gnu dot org>
- Date: Fri, 4 Mar 2005 12:17:50 -0000
- Subject: Re: HTT URLConnection.getInputStream seems broken in cvs
- References: <20050304091856.GE3448@papacharly.konqueror.de>
- Reply-to: phil at mkdoc dot com
On 4 Mar 2005, at 19:59, Fabio Roger wrote:
> yes. the problem happens when the gnu.java.net.protocol.http.Headers
> tries to parse the response.
>
> in fact the bug only happens when trying to download one specific
> file. I put this file here http://fabio.k2infinity.com/test.hdr and
> this code triggers the bug:
I would guess it's a problem with the declared character set. This
has a charset=GB2312 property on the content type:
HTTP/1.1 200 OK
Date: Fri, 04 Mar 2005 12:11:48 GMT
Server: Apache/2.0.52 (Fedora)
Last-Modified: Fri, 04 Mar 2005 11:27:49 GMT
ETag: "ccbed-b291-9463740"
Accept-Ranges: bytes
Content-Length: 45713
Connection: close
Content-Type: text/plain; charset=GB2312
> I tried putting the file here http://dinavis.net/test.hdr but
> downloading from that site the bug does not come up.
This does not have the same charset declaration:
HTTP/1.1 200 OK
Date: Fri, 04 Mar 2005 12:11:34 GMT
Server: Apache/2.0.50 (Debian GNU/Linux) mod_perl/1.99_14 Perl/v5.8.4 mod_ssl/2.0.50 OpenSSL/0.9.7d mod_auth_pgsql/2.0.1
Last-Modified: Fri, 04 Mar 2005 11:30:07 GMT
ETag: "3e8f3a-b291-117fedc0"
Accept-Ranges: bytes
Content-Length: 45713
Connection: close
Content-Type: text/plain