Changeset 1713


Ignore:
Timestamp:
2010-09-22 08:12:56 (3 years ago)
Author:
mpo
Message:

keep .json suffix in the stored filenames, but remove it from the URI send back in the Location header of the 201-CREATED

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-dbresources/kauri-dbresources-impl/src/main/java/org/kauriproject/dbresources/mock/DbMockResource.java

    r1706 r1713  
    6060import org.restlet.ext.json.JsonRepresentation; 
    6161import org.restlet.representation.Representation; 
    62 import org.restlet.representation.Variant; 
    63 import org.restlet.resource.Delete; 
    64 import org.restlet.resource.Post; 
    65 import org.restlet.resource.Put; 
    6662import org.restlet.resource.ServerResource; 
    6763 
     
    198194            jsonRequest = (JSONObject) JSONSerializer.toJSON(repr.getText()); 
    199195            // resource ref must be directory 
    200             String identifier = DbMockUtils.findAvailableFilename(filename) + ".json"; 
    201             filename += File.separator + identifier; 
     196            String identifier = DbMockUtils.findAvailableFilename(filename); 
     197            filename += File.separator + identifier + ".json"; 
    202198 
    203199            DbMockUtils.setContents(new File(filename), jsonRequest.toString(2)); 
Note: See TracChangeset for help on using the changeset viewer.