Daniel Cheng schrieb:
> On Thu, Jan 29, 2009 at 12:34 AM, Matthew Toseland
> <toad at amphibian.dyndns.org> wrote:
>> On Wednesday 28 January 2009 04:12, Daniel Cheng wrote:
>>> On Tue, Jan 27, 2009 at 10:20 PM, <toad at freenetproject.org> wrote:
>>>> Author: toad
>>>> Date: 2009-01-27 14:20:37 +0000 (Tue, 27 Jan 2009)
>>>> New Revision: 25310
>>>>
>>>> Modified:
>>>> branches/db4o/freenet/src/freenet/client/async/SimpleManifestPutter.java
>>>> Log:
>>>> Fix another of TheSeeker's transient NPEs, this time caused by FMS doing
>> transient ClientPutComplexDir's (why it does a putdir i have no idea...)
>>> FMS insert a freesite for user who opt-in.
>> Hmmm, what I heard was it used ClientPutComplexDir's for *lots* of things
>> e.g.
>> message lists, not just the freesite ... is this true?
>
> [overland]$ grep -r ClientPutComplexDir src/
> src/freenet/introductionpuzzleinserter.cpp:
> message.SetName("ClientPutComplexDir");
> src/freenet/messagelistinserter.cpp:
> message.SetName("ClientPutComplexDir");
> src/freenet/siteinserter.cpp: message.SetName("ClientPutComplexDir");
> src/freenet/trustlistinserter.cpp:
> message.SetName("ClientPutComplexDir");
>
> It use ClientPutComplexDir for all USK.
> Messagelist USK are for backward compatibility with old client (iirc)
> and can be removed .
>
> No idea why ClientPutComplexDir is used, though.
from SomeDude @ FMS:
> The Seeker at cI~w2hrvvyUa1E6PhJ9j5cCoG1xmxSooi7Nez4V2Gd4 wrote:
>> > Sites I can see, but why intruduction puzzles, message lists, and
>> > trust lists?
>
> Only the Freesite and Message List insertion rely on USKs. The reason
> for the ClientPutComplexDir is that ClientPut doesn't work as (I)
> expected with USKs that have filenames. You would think you could
> request the USK including the filename and get the data, but you cannot.
> Freenet returns a "Too many path components" error for such a request.
>
> This is easy to see. Just generate an SSK and do an insert and request
> like the following:
>
> ClientPut
> URI=USK at privatekey/clientput/0/one.txt
> Identifier=clientput
> UploadFrom=direct
> DataLength=1
> EndMessage
> 1
>
> ClientGet
> URI=USK at
> JeNSgMBP85X7bpq1FUMdBayrmXAGmzTLezCl34Tps~o,Xd~eJWyFRt3KrZx3U-JS4ty9qrMwoq3Zzq4Jb2Ao70I,AQACAAE/clientput/0/one.txt
> Identifier=clientget
> ReturnType=direct
> EndMessage
>
> This ClientGet returns "Too many path components." If you remove the
> filename from the USK and add a TargetFilename like the following, the
> same error is returned upon request.
>
> ClientPut
> URI=USK at privatekey/clientput1/0/
> Identifier=clientput
> UploadFrom=direct
> DataLength=1
> TargetFilename=one.txt
> EndMessage
> 1
>
> ClientGet
> URI=USK at
> JeNSgMBP85X7bpq1FUMdBayrmXAGmzTLezCl34Tps~o,Xd~eJWyFRt3KrZx3U-JS4ty9qrMwoq3Zzq4Jb2Ao70I,AQACAAE/clientput1/0/one.txt
> Identifier=clientget
> ReturnType=direct
> EndMessage
>
> Now, if you insert the same data using a ClientPutComplexDir, it works fine.
>
> ClientPutComplexDir
> URI=USK at privatekey/clientputcomplexdir/0/
> Identifier=clientputcomplexdir
> DefaultName=two.txt
> Files.0.Name=two.txt
> Files.0.UploadFrom=direct
> Files.0.DataLength=1
> EndMessage
> 2
>
> ClientGet
> URI=USK at
> JeNSgMBP85X7bpq1FUMdBayrmXAGmzTLezCl34Tps~o,Xd~eJWyFRt3KrZx3U-JS4ty9qrMwoq3Zzq4Jb2Ao70I,AQACAAE/clientputcomplexdir/0/two.txt
> Identifier=clientget
> ReturnType=direct
> EndMessage
>
> This ClientGet returns the data, 2.
>
> These are actual keys I used to test this, so you can request them and
> see the issue.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 315 bytes
Desc: OpenPGP digital signature
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20090129/717775ef/attachment.pgp>