public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain.
@ 2004-02-04 1:44 k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 1:47 ` [Bug libgcj/14009] " k dot allan-gcc at au dot darkbluesea dot com
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: k dot allan-gcc at au dot darkbluesea dot com @ 2004-02-04 1:44 UTC (permalink / raw)
To: gcc-bugs
gnu.java.net.protocol.http.Connection.sendRequest() does not handle situation
where a URL like "http://www.apache.org" (without trailing slash) is specified.
For the attached example, the following is executed via Sun Java:
[ken@deviation spider]$ /usr/j2sdk1.4.2_01/bin/javac test.java
[ken@deviation spider]$ java test apache.org
Retrieveing: http://apache.org/
Got: 8613 bytes
Retrieveing: http://apache.org
Got: 8613 bytes
When compiled and run with GCJ, the following happens:
[ken@deviation spider]$ CLASSPATH=/opt/gcc/share/java/libgcj-3.5.0.jar
/opt/gcc/bin/gcj -ggdb -O --main=test test.java -o test &&
LD_LIBRARY_PATH=/opt/gcc/lib ./test apache.org
Retrieveing: http://apache.org/
Got: 8613 bytes
Retrieveing: http://apache.org
Exception in thread "main" java.io.IOException: Server reply was unparseable:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
at gnu.java.net.protocol.http.Connection.receiveReply()
(/opt/gcc/lib/libgcj.so.6.0.0)
at gnu.java.net.protocol.http.Connection.connect() (/opt/gcc/lib/libgcj.so.6.0.0)
at gnu.java.net.protocol.http.Connection.getInputStream()
(/opt/gcc/lib/libgcj.so.6.0.0)
at test.main(java.lang.String[]) (/home/ken/workspace/spider/test.java:27)
The server-reply-unparseable error is due to the fact that the request was sent
out as "GET HTTP/1.1", and the webserver just sends back an HTMLified error
page sans the HTTP response headers.
What GCJ should be doing in this case is sending the request as "GET / HTTP/1.1"
and not "GET HTTP/1.0". One could probably get caught up in the argument
whether the original URL is syntactically correct, but the Sun implementation
works as expected, so the GCJ one should probably try to emulate that behaviour.
--
Summary: libgcj HttpURLConnection does not handle situation where
retrieving url without training slash after domain.
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: k dot allan-gcc at au dot darkbluesea dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
@ 2004-02-04 1:47 ` k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 1:51 ` [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing " bangerth at dealii dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: k dot allan-gcc at au dot darkbluesea dot com @ 2004-02-04 1:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From k dot allan-gcc at au dot darkbluesea dot com 2004-02-04 01:47 -------
Created an attachment (id=5671)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5671&action=view)
Test source file that demonstrates problem
This file when compiled by GCJ will cause an error, but not when compiled by
Sun Java.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 1:47 ` [Bug libgcj/14009] " k dot allan-gcc at au dot darkbluesea dot com
@ 2004-02-04 1:51 ` bangerth at dealii dot org
2004-02-04 1:55 ` k dot allan-gcc at au dot darkbluesea dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-02-04 1:51 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|libgcj HttpURLConnection |libgcj HttpURLConnection
|does not handle situation |does not handle situation
|where retrieving url without|where retrieving url without
|training slash after domain.|trailing slash after domain.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 1:47 ` [Bug libgcj/14009] " k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 1:51 ` [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing " bangerth at dealii dot org
@ 2004-02-04 1:55 ` k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 2:27 ` k dot allan-gcc at au dot darkbluesea dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: k dot allan-gcc at au dot darkbluesea dot com @ 2004-02-04 1:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From k dot allan-gcc at au dot darkbluesea dot com 2004-02-04 01:54 -------
Created an attachment (id=5672)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5672&action=view)
Patch against gcc/libjava/gnu/java/net/protocol/http/Connection.java
This patch rectifies the bug in this report by checking for an empty path and
substituting a "/" in place of nothing in the request line of the HTTP request
header.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (2 preceding siblings ...)
2004-02-04 1:55 ` k dot allan-gcc at au dot darkbluesea dot com
@ 2004-02-04 2:27 ` k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 6:58 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: k dot allan-gcc at au dot darkbluesea dot com @ 2004-02-04 2:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From k dot allan-gcc at au dot darkbluesea dot com 2004-02-04 02:27 -------
Created an attachment (id=5673)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5673&action=view)
Patch against gcc/libjava/gnu/java/net/protocol/http/Connection.java
This patch rectifies the bug in this report by checking for an empty path and
substituting a "/" in place of nothing in the request line of the HTTP request
header.
The previous patch submitted had a bug. This new patch has been compiled and
tested:
[ken@deviation spider]$ CLASSPATH=/opt/gcc/share/java/libgcj-3.5.0.jar
/opt/gcc/bin/gcj -ggdb -O --main=test test.java -o test &&
LD_LIBRARY_PATH=/opt/gcc/lib ./test apache.org
Retrieveing: http://apache.org/
Got: 8613 bytes
Retrieveing: http://apache.org
Got: 8613 bytes
--
What |Removed |Added
----------------------------------------------------------------------------
Attachment #5672 is|0 |1
obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (3 preceding siblings ...)
2004-02-04 2:27 ` k dot allan-gcc at au dot darkbluesea dot com
@ 2004-02-04 6:58 ` pinskia at gcc dot gnu dot org
2004-03-19 1:34 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-04 6:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-04 06:58 -------
Confirm, patches for libjava should to both gcc-patches and java-patches after reading http://
gcc.gnu.org/contribute.html, note this might need to go into classpath also as libjava gets merged in
from there.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-02-04 06:58:49
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (4 preceding siblings ...)
2004-02-04 6:58 ` pinskia at gcc dot gnu dot org
@ 2004-03-19 1:34 ` pinskia at gcc dot gnu dot org
2004-06-27 16:20 ` mckinlay at redhat dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-19 1:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-19 01:34 -------
*** Bug 14641 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ovidr at users dot
| |sourceforge dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (5 preceding siblings ...)
2004-03-19 1:34 ` pinskia at gcc dot gnu dot org
@ 2004-06-27 16:20 ` mckinlay at redhat dot com
2004-10-22 20:23 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mckinlay at redhat dot com @ 2004-06-27 16:20 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |16229
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (6 preceding siblings ...)
2004-06-27 16:20 ` mckinlay at redhat dot com
@ 2004-10-22 20:23 ` cvs-commit at gcc dot gnu dot org
2004-10-22 20:30 ` konqueror at gmx dot de
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-22 20:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-22 20:23 -------
Subject: Bug 14009
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mkoch@gcc.gnu.org 2004-10-22 20:23:22
Modified files:
libjava : ChangeLog
libjava/gnu/java/net/protocol/http: Connection.java
Log message:
2004-10-22 Michael Koch <konqueror@gmx.de>
PR libjava/14009
* gnu/java/net/protocol/http/Connection.java
(sendRequest): Handle case when url.getFile() returns an empty string.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3163&r2=1.3164
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/gnu/java/net/protocol/http/Connection.java.diff?cvsroot=gcc&r1=1.20&r2=1.21
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (7 preceding siblings ...)
2004-10-22 20:23 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-22 20:30 ` konqueror at gmx dot de
2004-10-22 20:35 ` konqueror at gmx dot de
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: konqueror at gmx dot de @ 2004-10-22 20:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From konqueror at gmx dot de 2004-10-22 20:30 -------
he patch got rewritten from scratch due to copyright assignment issues with
the patch attached to the bug report.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (8 preceding siblings ...)
2004-10-22 20:30 ` konqueror at gmx dot de
@ 2004-10-22 20:35 ` konqueror at gmx dot de
2004-11-06 15:49 ` pinskia at gcc dot gnu dot org
2004-12-18 2:29 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: konqueror at gmx dot de @ 2004-10-22 20:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From konqueror at gmx dot de 2004-10-22 20:35 -------
Bug fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (9 preceding siblings ...)
2004-10-22 20:35 ` konqueror at gmx dot de
@ 2004-11-06 15:49 ` pinskia at gcc dot gnu dot org
2004-12-18 2:29 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-06 15:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
` (10 preceding siblings ...)
2004-11-06 15:49 ` pinskia at gcc dot gnu dot org
@ 2004-12-18 2:29 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-18 2:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-18 02:29 -------
*** Bug 19066 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |zhsoft88 at sohu dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14009
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-12-18 2:29 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-04 1:44 [Bug libgcj/14009] New: libgcj HttpURLConnection does not handle situation where retrieving url without training slash after domain k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 1:47 ` [Bug libgcj/14009] " k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 1:51 ` [Bug libgcj/14009] libgcj HttpURLConnection does not handle situation where retrieving url without trailing " bangerth at dealii dot org
2004-02-04 1:55 ` k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 2:27 ` k dot allan-gcc at au dot darkbluesea dot com
2004-02-04 6:58 ` pinskia at gcc dot gnu dot org
2004-03-19 1:34 ` pinskia at gcc dot gnu dot org
2004-06-27 16:20 ` mckinlay at redhat dot com
2004-10-22 20:23 ` cvs-commit at gcc dot gnu dot org
2004-10-22 20:30 ` konqueror at gmx dot de
2004-10-22 20:35 ` konqueror at gmx dot de
2004-11-06 15:49 ` pinskia at gcc dot gnu dot org
2004-12-18 2:29 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).