question: private Response assureAcceptJSON ( IHTTPSession session ) { final Map < String , String > headers = session . getHeaders ( ) ; if ( ! APPLICATION_JSON . equals ( headers . get ( ACCEPT_FIELD ) ) ) { return newFixedLengthResponse ( Response . Status . NOT_ACCEPTABLE , MIME_PLAINTEXT , "set accept to application/json or remove it" ) ; } else { return null ; } }
target:  Ensures that the "accept" header is either set to JSON or empty