mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 49 forks source link

Some JavaScript libraries causing failures #252

Open phaselden opened 11 years ago

phaselden commented 11 years ago

I have a number of error messages in the dashboard. If I add all the offending .js libraries to javascriptUrlsToIgnore then it works, but I would prefer not to do this. Any suggestions?

Exception #1: There were errors reducing http://localhost:49473/Scripts/json2.js:: Exception #2: RequestReduce had problems accessing http://localhost:49473/Scripts/json2.js. Error Message from WebClient is: Too many automatic redirections were attempted. Stack Trace#2: at RequestReduce.Utilities.WebClientWrapper.Download(String url, IEnumerable1 requiredMimeTypes) in c:\RequestReduce\RequestReduce\Utilities\WebClientWrapper.cs:line 85 at RequestReduce.Utilities.WebClientWrapper.Download[T](String url) in c:\RequestReduce\RequestReduce\Utilities\WebClientWrapper.cs:line 35 at RequestReduce.Reducer.JavaScriptReducer.ProcessJavaScript(String url) in c:\RequestReduce\RequestReduce\Reducer\JavaScriptReducer.cs:line 56 at RequestReduce.Reducer.JavaScriptReducer.ProcessResource(Guid key, IEnumerable1 urls, String host) in c:\RequestReduce\RequestReduce\Reducer\JavaScriptReducer.cs:line 32 at RequestReduce.Reducer.HeadResourceReducerBase`1.Process(Guid key, String urls, String host) in c:\RequestReduce\RequestReduce\Reducer\HeadResourceReducerBase.cs:line 37 at RequestReduce.Module.ReducingQueue.ProcessQueuedItem() in c:\RequestReduce\RequestReduce\Module\ReducingQueue.cs:line 162

Exception #3: Too many automatic redirections were attempted.
Stack Trace#3:    at System.Net.HttpWebRequest.GetResponse()

at RequestReduce.Utilities.WebClientWrapper.Download(String url, IEnumerable`1 requiredMimeTypes) in c:\RequestReduce\RequestReduce\Utilities\WebClientWrapper.cs:line 62

mwrock commented 11 years ago

It sounds like there is an issue preventing RR from reaching the javascript url it is trying to process. RequestReduce downloads the content via HTTP as a normal anonymous request. The fact that you are getting a "Too many automatic redirections were attempted" message sounds like RR must be hitting some kind of redirect loop since the default redirection limit is 50. My guess is that this is a auth issue. Are these js urls accesible to an anonymous request? Or are there any network issues that might cause this when trying to reach the js endpoint from the web server where RR sits? Try to log on to the actual web server where RR is running and hit that url in a browser. Are you able to get to it?

phaselden commented 11 years ago

You set me on the right path I think. It looks like the references in the script tags in the master pages are incorrect. I will post further when I have worked it out. Thanks!