Added content type inferrence to resource servlet