How do I read browser header sequence from java web server?

63 views Asked by At

I have started being interested in browser fingerprints. As far as I understand: "The header order of each browser is fixed and cannot be changed in the browser settings." So,... to a start, I want to read the browser headers in the order in which they are sent by the browser.

I have tried with:

Ennumeration<String> headerNames = request.getHeaderNames();
While (headerNames!=null && headerNames.hasMoreElements()) {
   String key = headerNames.nextElement();
   <...more code...>
}

Unfortunately, nextElement() does not provide the same sequence as sent by the browser.

Therefore, what are the Java alternatives?

Note: my application runs on an Apache/Tomcat webserver on a webhotel, i.e. I am not able to make changes to the configuration of the Apache/Tomcat webserver.

0

There are 0 answers