automatically url-unquote caps in CLI and WUI #942

Open
opened 2010-02-08 19:29:37 +00:00 by zooko · 4 comments

I received a cap in the mail. It was url-quoted so that the : came out as %3A for example. I pasted it into the "link a child into this dir by its cap" form, but I got an error message saying that I had pasted an invalid cap:

MustNotBeUnknownRWError: an operation to add a child named 'its_a_zip_file.zip' to a directory was given an unknown cap in a write slot.
Using a webapi server that supports a later version of Tahoe may help.

If you are using the webapi directly, specifying a readcap in the read slot (ro_uri) of the JSON PROPDICT, as well as a writecap in the write slot if desired, would also work in this case.

It would be nice if the gateway would figure this one out. The code I wrote a long time ago in

See related ticket #885 (Ignore space or %20 in webapi URLs).

I received a cap in the mail. It was url-quoted so that the `:` came out as `%3A` for example. I pasted it into the "link a child into this dir by its cap" form, but I got an error message saying that I had pasted an invalid cap: ``` MustNotBeUnknownRWError: an operation to add a child named 'its_a_zip_file.zip' to a directory was given an unknown cap in a write slot. Using a webapi server that supports a later version of Tahoe may help. If you are using the webapi directly, specifying a readcap in the read slot (ro_uri) of the JSON PROPDICT, as well as a writecap in the write slot if desired, would also work in this case. ``` It would be nice if the gateway would figure this one out. The code I wrote a long time ago in See related ticket #885 (Ignore space or %20 in webapi URLs).
zooko added the
code-frontend
major
defect
1.6.0
labels 2010-02-08 19:29:37 +00:00
zooko added this to the undecided milestone 2010-02-08 19:29:37 +00:00
tahoe-lafs modified the milestone from undecided to 1.7.0 2010-02-11 04:51:37 +00:00
tahoe-lafs added
code-frontend-web
and removed
code-frontend
labels 2010-02-11 04:52:00 +00:00
tahoe-lafs modified the milestone from 1.7.0 to 1.6.1 2010-02-15 20:09:47 +00:00
davidsarah commented 2010-02-15 20:17:27 +00:00
Owner

On second thoughts, this doesn't need to be done for 1.6.1.

On second thoughts, this doesn't need to be done for 1.6.1.
tahoe-lafs modified the milestone from 1.6.1 to 1.7.0 2010-02-15 20:17:27 +00:00
tahoe-lafs modified the milestone from 1.7.0 to 1.7.1 2010-06-12 21:04:29 +00:00
tahoe-lafs modified the milestone from 1.7.1 to 1.8.0 2010-07-17 04:18:50 +00:00
tahoe-lafs modified the milestone from 1.8.0 to soon 2010-08-08 05:34:38 +00:00
tahoe-lafs modified the milestone from soon to 1.10.0 2011-08-15 04:24:50 +00:00
davidsarah commented 2011-08-17 04:38:35 +00:00
Owner

The error message is also confusing, especially the part that says:

If you are using the webapi directly, specifying a readcap in the read slot
(ro_uri) of the JSON PROPDICT, as well as a writecap in the write slot if
desired, would also work in this case.

When I wrote that message, I was thinking of the case of a valid URI of some unknown future format, but not of a corrupted URI in a current format -- which is probably more likely. Also the message is way too developer-oriented; it should reference a section of webapi.rst rather than trying to explain the constraints on which caps can go in which slot itself.

The error message is also confusing, especially the part that says: ``` If you are using the webapi directly, specifying a readcap in the read slot (ro_uri) of the JSON PROPDICT, as well as a writecap in the write slot if desired, would also work in this case. ``` When I wrote that message, I was thinking of the case of a **valid** URI of some unknown future format, but not of a corrupted URI in a current format -- which is probably more likely. Also the message is way too developer-oriented; it should reference a section of webapi.rst rather than trying to explain the constraints on which caps can go in which slot itself.
davidsarah commented 2012-09-14 20:45:31 +00:00
Owner

This applies to both WUI form fields, and the CLI. #1806 was a duplicate for the latter; I don't think we need two tickets since it's likely that the same fix will work for both.

This applies to both WUI form fields, and the CLI. #1806 was a duplicate for the latter; I don't think we need two tickets since it's likely that the same fix will work for both.
tahoe-lafs added
code-frontend
and removed
code-frontend-web
labels 2012-09-14 20:46:11 +00:00
tahoe-lafs changed title from automatically url-unquote caps to automatically url-unquote caps in CLI and WUI 2012-09-14 20:46:11 +00:00
davidsarah commented 2012-09-14 21:05:33 +00:00
Owner

Replying to davidsarah:

The error message is also confusing, especially the part that says:

If you are using the webapi directly, specifying a readcap in the read slot
(ro_uri) of the JSON PROPDICT, as well as a writecap in the write slot if
desired, would also work in this case.

Fixing that would be part of #884.

Replying to [davidsarah](/tahoe-lafs/trac-2024-07-25/issues/942#issuecomment-75272): > The error message is also confusing, especially the part that says: > ``` > If you are using the webapi directly, specifying a readcap in the read slot > (ro_uri) of the JSON PROPDICT, as well as a writecap in the write slot if > desired, would also work in this case. > ``` Fixing that would be part of #884.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#942
No description provided.