benoitc/restkit — Issue #82: Problem with restkit.forms.BoundaryItem encoded "name"
Author: jensens
Created: 2011-12-09 11:12:43+00:00
State: open

I'am using restkit with soundclouds restful API and it works fine so far, except if I do a multipart PUT or POST. Soundcloud expects keys (instance variable 'name' on restkit.forms.BoundaryItem) looking like "track[assetdata]". Now at first line in '__init__ ' at restkit code it gets urlquoted and the brackets are %SOMETHING values. Soundcloud does not accept the encoded values. I dumped the request of restkit and curl: curl does not urlqoute. Changing then the line to "self.name = name" helps and soundcloud accepts the fields.

So my questions:

- Is there any reason to urlquote the name? And if yes why?
- Is there any header missing/available telling the server to look for urlquotes? If yes it should be set automatized.
- If theres no/a reason to urlquote in general, i.e. for specific cases only or vice versa, can we make it configurable?

With answers provided I can fork, make needed changes and send a pull request. But w/o any further information I'd possibly do the wrong change.

regards Jens