Hi Chris, On Tue, 2005-04-26 at 19:59 +0100, Chris Burdess wrote: > > Chris, you wrote this code originally following the spec precisely. Do > > you think this is a good patch/idea? > > If we allow this, should we not also allow any relative URI?
Yes, good point. I quickly looked at what GNU wget does and it has this
comment:
/* The HTTP specs only allow absolute URLs to appear in
redirects, but a ton of boneheaded webservers and CGIs out
there break the rules and use relative URLs, and popular
browsers are lenient about this, so wget should be too. */
> I don't like this much, but if we are to accept malformed absolute URIs
> I feel strongly that we should at least report the event as a warning.
> [...]
> Do we have a standard mechanism for reporting warning conditions? Is
> System.err.println acceptable?
We currently don't. We could use java.util.logging. But that is a but
heavy-weight and not really tested in production. In this particular
case I would not really want to log or give a warning since it seems
such a common practise. (Maybe if we had a system property
gnu.classpath.standards.mode [lenient, warn, strict] that we could
check.)
> I suggest the following patch to implement getErrorStream correctly:
>
> 2005-04-26 Chris Burdess <[EMAIL PROTECTED]>
>
> * gnu/java/net/protocol/http/HTTPURLConnection.java: Throw
> FileNotFoundException and implement getErrorStream on 404.
Thanks. That makes sense.
Could you commit both your patches?
Or I can do it. I would like to get this in before the next snapshot
release tomorrow because it breaks -link support for some people in the
new gjdoc.
Cheers,
Mark
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
