mwrock/RequestReduce — Issue #133: Issues with contentHost and @import from another domain
Author: marcusgreenwood
Created: 2012-02-07 11:03:56+00:00
State: open

I have a couple of @import references in my CSS for Google web fonts:

@import url("http://fonts.googleapis.com/css?family=Alfa+Slab+One");
@import url("http://fonts.googleapis.com/css?family=Corben");

RequestReduce is erroring when processing these @imports. The issue is that it is changing the host name to the CDN I have specified in my contentPath attribute. and therefore the server is returning a 404/3.

System.ApplicationException: There were errors reducing http://hatchplatform.com/CSS/All.less::http://hatchplatform.com/demo/~Style/CSS:: ---> System.InvalidOperationException: RequestReduce had problems accessing http://www.hatchcdn.com/css?family=Alfa+Slab+One. Error Message from WebClient is: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.

Ideally RequestReduce should leave these @imports as they are rather than processing them because Google web-fonts issues different CSS depending on the browser that is being used.