public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/13972] New: gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly.
@ 2004-02-02 1:22 k dot allan-gcc at au dot darkbluesea dot com
2004-02-02 1:25 ` [Bug libgcj/13972] " k dot allan-gcc at au dot darkbluesea dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: k dot allan-gcc at au dot darkbluesea dot com @ 2004-02-02 1:22 UTC (permalink / raw)
To: gcc-bugs
Hi,
I noticed that the URL function in libgcj's java.net.URL does not properly
process requests like:
URL("http://domain.com", "/redir?http://domain2.com/index.html");
This is because at the start of the function, context is set to null if spec
contains a :// anywhere, but even in the comment at the top of that function it
is mentioned that:
/* A protocol is defined by the doc as the substring before a ':'
* as long as the ':' occurs before any '/'.
Hence I submit the following diff against CVS:
--- URL.java 31 Dec 2003 10:55:40 -0000 1.34
+++ URL.java 2 Feb 2004 01:18:04 -0000
@@ -379,12 +379,12 @@
// An absolute URL must have chars prior to "://" but cannot have a colon
// right after the "://". The second colon is for an optional port value
// and implies that the host from the context is used if available.
- int colon;
+ int colon, slash;
if ((colon = spec.indexOf("://", 1)) > 0 &&
+ ((colon < (slash = spec.indexOf('/')) || slash < 0)) &&
! spec.regionMatches(colon, "://:", 0, 4))
context = null;
- int slash;
if ((colon = spec.indexOf(':')) > 0 &&
(colon < (slash = spec.indexOf('/')) || slash < 0))
{
My gcc version information:
Configured with: ../gcc/configure --enable-threads=posix --prefix=/opt/gcc
--enable-shared --enable-languages=c++,java
Thread model: posix
gcc version 3.5.0 20040121 (experimental)
--
Summary: gcj's URL() does not handle ContextURL +
"/redir?http://domain2.com/index.html" correctly.
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=13972
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/13972] gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly.
2004-02-02 1:22 [Bug libgcj/13972] New: gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly k dot allan-gcc at au dot darkbluesea dot com
@ 2004-02-02 1:25 ` k dot allan-gcc at au dot darkbluesea dot com
2004-02-02 4:27 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: k dot allan-gcc at au dot darkbluesea dot com @ 2004-02-02 1:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From k dot allan-gcc at au dot darkbluesea dot com 2004-02-02 01:25 -------
Created an attachment (id=5641)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5641&action=view)
Patch against gcc/libjava/java/net/URL.java
This patch will rectify the problem mentioned in the bug report... it's
probably not as efficient as it could be.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13972
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/13972] gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly.
2004-02-02 1:22 [Bug libgcj/13972] New: gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly k dot allan-gcc at au dot darkbluesea dot com
2004-02-02 1:25 ` [Bug libgcj/13972] " k dot allan-gcc at au dot darkbluesea dot com
@ 2004-02-02 4:27 ` pinskia at gcc dot gnu dot org
2004-06-27 16:20 ` mckinlay at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-02 4:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-02 04:27 -------
Confirmed, gcj patches should be sent to gcc-patches and java-patches.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-02-02 04:27:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13972
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/13972] gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly.
2004-02-02 1:22 [Bug libgcj/13972] New: gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly k dot allan-gcc at au dot darkbluesea dot com
2004-02-02 1:25 ` [Bug libgcj/13972] " k dot allan-gcc at au dot darkbluesea dot com
2004-02-02 4:27 ` pinskia at gcc dot gnu dot org
@ 2004-06-27 16:20 ` mckinlay at redhat dot com
2005-01-11 20:40 ` cvs-commit at gcc dot gnu dot org
2005-01-11 20:43 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ 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=13972
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/13972] gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly.
2004-02-02 1:22 [Bug libgcj/13972] New: gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly k dot allan-gcc at au dot darkbluesea dot com
` (2 preceding siblings ...)
2004-06-27 16:20 ` mckinlay at redhat dot com
@ 2005-01-11 20:40 ` cvs-commit at gcc dot gnu dot org
2005-01-11 20:43 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-11 20:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-11 20:40 -------
Subject: Bug 13972
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mkoch@gcc.gnu.org 2005-01-11 20:40:11
Modified files:
libjava : ChangeLog
libjava/java/net: URL.java
Log message:
2005-01-11 Michael Koch <konqueror@gmx.de>
PR libgcj/13972
* java/net/URL.java (URL): Handle specs like
"/redir?http://domain2.com/index.html" which start with a slash.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3284&r2=1.3285
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/net/URL.java.diff?cvsroot=gcc&r1=1.44&r2=1.45
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13972
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcj/13972] gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly.
2004-02-02 1:22 [Bug libgcj/13972] New: gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly k dot allan-gcc at au dot darkbluesea dot com
` (3 preceding siblings ...)
2005-01-11 20:40 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-11 20:43 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-11 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-11 20:43 -------
Fixed on the mainline for 4.0.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13972
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-01-11 20:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-02 1:22 [Bug libgcj/13972] New: gcj's URL() does not handle ContextURL + "/redir?http://domain2.com/index.html" correctly k dot allan-gcc at au dot darkbluesea dot com
2004-02-02 1:25 ` [Bug libgcj/13972] " k dot allan-gcc at au dot darkbluesea dot com
2004-02-02 4:27 ` pinskia at gcc dot gnu dot org
2004-06-27 16:20 ` mckinlay at redhat dot com
2005-01-11 20:40 ` cvs-commit at gcc dot gnu dot org
2005-01-11 20:43 ` 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).