Author: fmui Date: Tue Feb 1 16:46:49 2011 New Revision: 1066092 URL: http://svn.apache.org/viewvc?rev=1066092&view=rev Log: - corrected HTTP status codes
Modified: incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/createdocument.html Modified: incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java?rev=1066092&r1=1066091&r2=1066092&view=diff ============================================================================== --- incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java (original) +++ incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java Tue Feb 1 16:46:49 2011 @@ -81,9 +81,9 @@ public final class ObjectService { JSONObject jsonObject = JSONConverter.convert(object, typeCache); - response.setStatus(HttpServletResponse.SC_OK); + response.setStatus(HttpServletResponse.SC_CREATED); BrowserBindingUtils.setCookie(request, response, repositoryId, transaction, - BrowserBindingUtils.createCookieValue(200, object.getId(), null)); + BrowserBindingUtils.createCookieValue(201, object.getId(), null)); BrowserBindingUtils.writeJSON(jsonObject, request, response); } @@ -118,9 +118,9 @@ public final class ObjectService { JSONObject jsonObject = JSONConverter.convert(object, typeCache); - response.setStatus(HttpServletResponse.SC_OK); + response.setStatus(HttpServletResponse.SC_CREATED); BrowserBindingUtils.setCookie(request, response, repositoryId, transaction, - BrowserBindingUtils.createCookieValue(200, object.getId(), null)); + BrowserBindingUtils.createCookieValue(201, object.getId(), null)); BrowserBindingUtils.writeJSON(jsonObject, request, response); } Modified: incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/createdocument.html URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/createdocument.html?rev=1066092&r1=1066091&r2=1066092&view=diff ============================================================================== --- incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/createdocument.html (original) +++ incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/createdocument.html Tue Feb 1 16:46:49 2011 @@ -92,11 +92,11 @@ function showNewDocumentId(result) { </tr> <tr> <td>File name:</td> - <td><input name="filename" type="text" size="100" maxlength="30" value=""> (if left blank the orignal file name is used)</td> + <td><input name="filename" type="text" size="30" maxlength="30" value=""> (if left blank the orignal file name is used)</td> </tr> <tr> <td>Content type:</td> - <td><input name="contentType" type="text" size="100" maxlength="30" value=""> (if left blank the content type is determined by the browser)</td> + <td><input name="contentType" type="text" size="30" maxlength="30" value=""> (if left blank the content type is determined by the browser)</td> </tr> <tr> <td>File:</td>