Closed benallenallen closed 9 years ago
@benallenallen @b-k-white - do the methods in RESTConfigService
have this same issue? Looking at the code in getConfigByName
for example, I think they do. It calls getObjectByPath
in order to get an OCO, which I think is fine. However, it then calls CoreContext.getContent().getContent()
before doing the modified date check.
Same deal with RestUserPreferencesService#getUserPreferenceByName
Fixed by changing the order of things to correctly check the modified date before grabbing the full content in all 4 locations we discovered. CR-Ballen,George OC-REV-10213
The very first thing that we do in RESTContent is
This negates the idea of us trying to save time by using the "HEADER_IF_MODIFIED_SINCE" parameter since if the content is large, we have to stream the whole thing to the OC server just to see if the modifyDate is greater than what the client has in its header.
The better way to do this would be to just call enhancedGetProperties and immediately do the check against the property that comes back rather than all of the processing in-between only to later check if we even need to be doing any processing on the server and just returning a 304.