#942 assigned defect

automatically url-unquote caps in CLI and WUI

Reported by: zooko Owned by: davidsarah
Priority: major Milestone: soon
Component: code-frontend Version: 1.6.0
Keywords: usability newurls cli wui Cc:
Launchpad Bug:

Description

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).

Change History (12)

comment:1 Changed at 2010-02-11T04:51:37Z by davidsarah

  • Milestone changed from undecided to 1.7.0
  • Owner set to davidsarah
  • Status changed from new to assigned

comment:2 Changed at 2010-02-11T04:52:00Z by davidsarah

  • Component changed from code-frontend to code-frontend-web

comment:3 Changed at 2010-02-15T20:09:47Z by davidsarah

  • Milestone changed from 1.7.0 to 1.6.1

comment:4 Changed at 2010-02-15T20:17:27Z by davidsarah

  • Milestone changed from 1.6.1 to 1.7.0

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

comment:5 Changed at 2010-06-12T21:04:29Z by davidsarah

  • Milestone changed from 1.7.0 to 1.7.1

comment:6 Changed at 2010-07-17T04:18:50Z by davidsarah

  • Milestone changed from 1.7.1 to 1.8.0

comment:7 Changed at 2010-08-08T05:34:38Z by davidsarah

  • Milestone changed from 1.8.0 to soon

comment:8 Changed at 2011-08-15T04:24:50Z by davidsarah

  • Milestone changed from soon to 1.10.0

comment:9 follow-up: Changed at 2011-08-17T04:38:35Z by 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.

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.

comment:10 Changed at 2012-09-14T20:45:31Z by davidsarah

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.

comment:11 Changed at 2012-09-14T20:46:11Z by davidsarah

  • Component changed from code-frontend-web to code-frontend
  • Keywords cli wui added
  • Summary changed from automatically url-unquote caps to automatically url-unquote caps in CLI and WUI

comment:12 in reply to: ↑ 9 Changed at 2012-09-14T21:05:33Z by davidsarah

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.

Note: See TracTickets for help on using tickets.