| Summary: | [server] Preference PUT format does not scale | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> |
| Component: | Client | Assignee: | John Arthorne <john.arthorne> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | simon_kaegi |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
John Arthorne
For PreferencesServlet:
private String getBodyAsString(HttpServletRequest req) throws IOException {
StringWriter writer = new StringWriter();
IOUtilities.pipe(req.getReader(), writer, true, false);
return writer.toString();
}
Fixed. Putting a single value now uses a form-encoded request body, which is more standard for PUT operations. PUT /prefs/user/myprefs Orion-Version: 1.0 Content-Length: 21 Content-Type: "application/x-www-form-urlencoded" key=Name&value=Enkidu Hmm... is that a complete representation of /prefs/user/myprefs or just a PATCH? (In reply to comment #3) > Hmm... is that a complete representation of /prefs/user/myprefs or just a > PATCH? It is just a single key/value. This can also be expressed as the following if you prefer this equivalent syntax: PUT /prefs/user/myprefs?key=Name value=Frodo |