How is 404 answer possible only in IE8?

I have a Spring application (with Spring Security and Spring MVC) deployed on a Tomcat server. The app works great in Firefox, Chrome, Opera, and IE9.

I have a strange problem with IE8. The login screen is loaded, and (as I see in the server logs) the session is open when the username and password are specified. After user registration and browser redirection to the main page, the server returns a 404 error.

Since there is no network panel in the IE8 developer tools, I used Fiddler to monitor http connections. I thought it might happen that during the page loading, he made the wrong request, but it was a main page request that responds to 404.

How is it possible that a server response from 404 to the main page is only requested in IE8?

Thanks.

Edited by:

This is the request header for IE8 and Firefox respectively:

GET /myWebApp/ HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: es-ES User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C; .NET4.0E) UA-CPU: AMD64 Accept-Encoding: gzip, deflate Host: dev.mydomain.com Connection: Keep-Alive Cookie: JSESSIONID=ABA1382304002F894ABDFCC2442FA5F8; SPRING_SECURITY_REMEMBER_ME_COOKIE=NGUxMTZlOTY3OGM0OTgxNDY4NDczOTlkOjEzMjQ1ODMwMzU0MDI6OWZiYzdhYjY1ODY2Mzc3YmI0Yzc5YTMzMWI5NDhjNTg 

-

 GET /myWebApp/ HTTP/1.1 Host: dev.mydomain.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: es-es,chrome://global/locale/intl.properties;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive Cookie: JSESSIONID=7FD3B02252E2FCBC9BE7249AFD84F541; SPRING_SECURITY_REMEMBER_ME_COOKIE=NGUxMmYxMTgzMmRjZTM0NzYyMWVjOWEwOjEzMjQ1ODMwMTA1MTU6MzFiYzU4OGQ4NTMwN2Y3M2I4YmQzN2M0NzY2MzcwZjI 
+4
source share
1 answer

Knowing that the problem was in the “Accept” question, I reviewed the MVC Controller class mappings, and I finally found the problem. Somehow, it was like the main page was displayed in MVC, so it did not work with the IE8 header attribute:

 @RequestMapping( value = "/", headers = "Accept=text/*" ) 

Today I learned a lesson .; -)

+1
source

Source: https://habr.com/ru/post/1385413/


All Articles