On 10-Oct-07, at 12:39 PM, Alberto Ruiz wrote: > The problem is that on the first example, we use the request URI to > identify wich object do we want to modify, sending a post value to > http://localhost:8080/vserver/default/extension/jpeg/directory_root
Let's see if I understand correctly (without looking at the actual Cherokee code yet)... So, /vserver/default/extension/jpeg/directory_root is the key you are trying to update? Or is /vserver/default an instance of Cherokee and /extension/jpeg/ directory_root the key? > There are config paths that contains slashes, for example: > !vserver!default!directory!/admin!... > > the problem here is that we need to modify the URI because slashes > are used to split the URI: > http://localhost:8080/vserver/default/directory//admin/. .. > I've solved this already using the dollar sign: > http://localhost:8080/vserver/default/directory/$admin/... What is "/admin" in this url... a configuration key? Why the extra slash, when the /extension/jpeg/directory_root doesn't have double slashes? (Excuse my ignorance :) ) You could always url-encode instead of doing custom separators (%2F insead of $). > However, the second approach that alo demonstrates has an > advantage, you can send several configuration values using just one > request. So I think that we should go for the second approach. The second approach being posting multiple key=value pairs (one per line?) to a single endpoint, right? Alternatively, why not chose that one specific endpoint to handle configuration data, and post XML or JSON data to it? Then you can include as many configuration keys & values as you want without having to deal with custom encoding. Something like... ----- POST /update-configuration HTTP/1.1 Content-Length: ## Content-Type: application/json [ {key: "extension/jpeg/directory_root", value: "/tmp"}, {key: "directory/admin", value: "/"} ] ----- _______________________________________________ Cherokee mailing list [email protected] http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee
