On Wed, Jul 24, 2002 at 10:32:56PM -0500, Ed Onken wrote:
> At 09:21 PM 07/24/2002 -0500, Ed Onken wrote:
>
> As far as my below fix goes, I don't whether or not we want to fire a
> CollisionEvent or not when a CHK has a key collision. I don't know if it
> would confuse clients or not to have a insert succeed even when a key
> collision occurs.
I vote that we ignore CHK collisions at the client end, and just
document it somewhere.
>
> >At 02:21 AM 07/25/2002 +0100, Matthew Toseland wrote:
> >>I thought we fixed this ages ago? Anyway, freenet.client.cli.Main
> >>doesn't insert the redirect if the file being inserted is already in
> >>Freenet. If anyone feels like fixing this etc etc; I haven't found the
> >>relevant code yet. For the occasional freesites that use this, this
> >>could be used as a DoS against DBR sites with predictable content.
> >
> >Ah... I remember that discussion and here is something very similar to my
> >original proposed fix for that problem... Oskar (IIRC) offered to apply
> >this fix to CVS if I gave him a cvs diff. I did not. Here are two
> >versions, one human readable, and one from a cvs diff. I got busy and
> >totally forgot about this. If we could get confirmations from a few
> >others that this does indeed fix the problem, could somebody check this
> >into CVS? Thanks in advance.
> >
> >The class involved is freenet.client.FCPClient. Like I warned before, I
> >have no idea where the corresponding fix would go in the FNP client code.
> >
> >else if (m.messageType.equals("KeyCollision")) {
> > FreenetURI uri = new FreenetURI(m.fs.get("URI"));
> > req.clientKey = AbstractClientKey.createFromRequestURI(uri);
> > req.produceEvent(new GeneratedURIEvent("Insert URI", uri));
> > if ("CHK".equals(uri.getKeyType())) {
> > tryState(Request.DONE);
> > } else {
> > req.produceEvent(new CollisionEvent(req.clientKey));
> > tryState(Request.FAILED);
> > }
> > return;
> > }
> >
> >
> >Index: src/freenet/client/FCPClient.java
> >===================================================================
> >RCS file: /cvsroot/freenet/freenet/src/freenet/client/FCPClient.java,v
> >retrieving revision 1.3
> >diff -c -r1.3 FCPClient.java
> >*** src/freenet/client/FCPClient.java 7 Feb 2002 04:08:36 -0000 1.3
> >--- src/freenet/client/FCPClient.java 25 Jul 2002 02:01:54 -0000
> >***************
> >*** 562,569 ****
> > FreenetURI uri = new FreenetURI(m.fs.get("URI"));
> > req.clientKey =
> >AbstractClientKey.createFromRequestURI(uri);
> > req.produceEvent(new GeneratedURIEvent("Insert
> >URI", uri));
> >! req.produceEvent(new CollisionEvent(req.clientKey));
> >! tryState(Request.FAILED);
> > return;
> > }
> > else if (m.messageType.equals("URIError")) {
> >--- 562,573 ----
> > FreenetURI uri = new FreenetURI(m.fs.get("URI"));
> > req.clientKey =
> >AbstractClientKey.createFromRequestURI(uri);
> > req.produceEvent(new GeneratedURIEvent("Insert
> >URI", uri));
> >! if ("CHK".equals(uri.getKeyType())) {
> >! tryState(Request.DONE);
> >! } else {
> >! req.produceEvent(new
> >CollisionEvent(req.clientKey));
> >! tryState(Request.FAILED);
> >! }
> > return;
> > }
> > else if (m.messageType.equals("URIError")) {
> >
> >
> >_______________________________________________
> >devl mailing list
> >[EMAIL PROTECTED]
> >http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
>
> _______________________________________________
> devl mailing list
> [EMAIL PROTECTED]
> http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
msg03508/pgp00000.pgp
Description: PGP signature