case, mediatype, and pathsegment optimizations