0

i am facing issue where in Chrome is making multiple Rest Get calls ( not immediately but after some delay), even when i requested only once. this is not happening in other browsers, seems to be specific to Chrome.

The Rest Get call i am working will returns audio or video file and it plays in browser. when audio and video is playing, chrome is making other call and the server is throwing broken pipe exception. below is info as i see from Chrome developer Tools

General Data
Request URL:http://localhost:6390/x/y/MP3
Request Method:GET
Status Code:200 
Remote Address:[::1]:6390
Referrer Policy:no-referrer-when-downgrade

Request Headers
Accept:*/*
Accept-Encoding:identity;q=1, *;q=0
Accept-Language:en-US,en;q=0.8,te;q=0.6
Connection:keep-alive
Host:localhost:6390
Range:bytes=0-

Response Headers
Cache-Control:max-age=31536000, public
Content-Length:27133142
Content-Type:audio/mpeg
Date:Mon, 22 May 2017 01:00:31 GMT
Expires:Mon, 21 May 2018 21:00:31 GMT

if we look at the content-length of the response on first call, it is almost 25 mb file, but only downloading around 5.3mb file, and when audio/video is playing for downloaded file, Chrome is making additional call even when the response code is 200 first call.

Here is info from 2nd Call even when i have not requested. it is called by Chrome automatically

General Info
Request URL:http://localhost:6390/x/y/MP3
Request Method:GET
Status Code:200 
Remote Address:[::1]:6390
Referrer Policy:no-referrer-when-downgrade

Request Headers
Accept:*/*
Accept-Encoding:identity;q=1, *;q=0
Accept-Language:en-US,en;q=0.8,te;q=0.6
Connection:keep-alive
Host:localhost:6390
Range:bytes=5421245-

Response Headers
Cache-Control:max-age=31536000, public
Content-Length:27133142
Content-Type:audio/mpeg
Date:Mon, 22 May 2017 01:20:07 GMT
Expires:Mon, 21 May 2018 21:20:07 GMT

2nd request have bytes header with range. why is chrome making second call with range header even when first request i am sending complete content and response code of 200. i am under impression that unless i use Bytes Header with 206, browser should not make additional call.

i have checked many threads on why chrome is making additional calls, but they dont seem to fall into issue i am facing.

please help me on why i am facing this issue on chrome, any pointers would be helpful.

my Stack is Spring Boot, Spring Rest and Tomcat server

prred
  • 131
  • 1
  • 8
  • Share some code snippet here – Akhil Menon May 22 '17 at 05:24
  • [Check this link Answer of RomanK](http://stackoverflow.com/questions/4460661/what-to-do-with-chrome-sending-extra-requests) – Akhil Menon May 22 '17 at 05:26
  • i do see error in developer tools which says net::ERR_CONTENT_LENGTH_MISMATCH , i have verified the content length is correct. what can be cause of this issue? – prred May 23 '17 at 19:48

0 Answers0