I have to validate the Content-Type header value before passing it to an HTTP request.
Is there a specific list for all the possible values of Content-Type?
Otherwise, is there a way to validate the content type before using it …
I am created some jsp file that returns as a response some json string. But I see that the Content-Type is set to txt automatically
My jsp code looks like
<%@ page import="java.util.Random" %>
<%@ page language="…
What I'm trying to do here is get the headers of a given URL so I can determine the MIME type. I want to be able to see if http://somedomain/foo/ will return an HTML document or a JPEG …