{"action":"created","issue":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/337","repository_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor","labels_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/337/comments","events_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/337/events","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/337","id":139055397,"number":337,"title":"Error 400 (Bad Request) with ImageProcessor.Web and Azure Cache","user":{"login":"bussemac","id":842344,"avatar_url":"https://avatars.githubusercontent.com/u/842344?v=3","gravatar_id":"","url":"https://api.github.com/users/bussemac","html_url":"https://github.com/bussemac","followers_url":"https://api.github.com/users/bussemac/followers","following_url":"https://api.github.com/users/bussemac/following{/other_user}","gists_url":"https://api.github.com/users/bussemac/gists{/gist_id}","starred_url":"https://api.github.com/users/bussemac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bussemac/subscriptions","organizations_url":"https://api.github.com/users/bussemac/orgs","repos_url":"https://api.github.com/users/bussemac/repos","events_url":"https://api.github.com/users/bussemac/events{/privacy}","received_events_url":"https://api.github.com/users/bussemac/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/framework","name":"framework","color":"682079"},{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/question","name":"question","color":"f357a1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-07T18:32:49Z","updated_at":"2016-03-14T14:18:09Z","closed_at":null,"body":"I think I have this setup correctly:\r\nI have a classic storage account with two blobs: media and cache, both are set for public container (I wasn't sure if public blob was enough).\r\nI have a CDN classic setup pointing to media.\r\nAll my config files have the azure accounts and keys, these nuget versions:\r\n* UmbracoFileSystemProviders.Azure    {0.5.1-beta}\r\n* ImageProcessor                      {2.3.3.0}                  \r\n* ImageProcessor.Web                  {4.5.3.0}                            \r\n* ImageProcessor.Web.Config           {2.2.5.0}                        \r\n* ImageProcessor.Web.Plugins.Azure... {1.0.8.0}\r\n\r\nIf I request /media/1010/image.png the image loads. I also see some things being populated into the cache blob.\r\nIf I request /media/1010/image.png?width=40 I get an Error 400\r\n\r\n> [WebException: The remote server returned an error: (400) Bad Request.]\r\n>    System.Net.HttpWebRequest.GetResponse() +1390\r\n>    ImageProcessor.Web.Plugins.AzureBlobCache.<>c__DisplayClass36.<RewritePath>b__33() +36\r\n>    ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache.TryFiveTimes(Action delegateAction) +51\r\n>    ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache.RewritePath(HttpContext context) +192\r\n>    ImageProcessor.Web.HttpModules.<ProcessImageAsync>d__b.MoveNext() +5080\r\n> \r\n> \r\n\r\nAny ideas why the ImageProcessor query string is breaking?"},"comment":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/comments/196326706","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/337#issuecomment-196326706","issue_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/337","id":196326706,"user":{"login":"bussemac","id":842344,"avatar_url":"https://avatars.githubusercontent.com/u/842344?v=3","gravatar_id":"","url":"https://api.github.com/users/bussemac","html_url":"https://github.com/bussemac","followers_url":"https://api.github.com/users/bussemac/followers","following_url":"https://api.github.com/users/bussemac/following{/other_user}","gists_url":"https://api.github.com/users/bussemac/gists{/gist_id}","starred_url":"https://api.github.com/users/bussemac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bussemac/subscriptions","organizations_url":"https://api.github.com/users/bussemac/orgs","repos_url":"https://api.github.com/users/bussemac/repos","events_url":"https://api.github.com/users/bussemac/events{/privacy}","received_events_url":"https://api.github.com/users/bussemac/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T14:18:09Z","updated_at":"2016-03-14T14:18:09Z","body":"So there's no URL rewriting for things not passed through IP, and that's by design? I see the HTTP Headers being set, yet if I reload (not force-reload, just a regular click the reload button), the result is that the images that ARE done via IP are available instantly while everything else has to redownload.\r\n\r\n![screenshot044](https://cloud.githubusercontent.com/assets/842344/13746850/c08396a6-e9cb-11e5-800d-24457fa1dab1.gif)\r\n\r\n![screenshot043](https://cloud.githubusercontent.com/assets/842344/13746821/92be2470-e9cb-11e5-9482-ade7e2757312.gif)\r\n\r\nFiddler does warn for the items coming directly from media (included the 302 responses generated for the IP images): \"This response contains neither an ETAG nor a Last-Modified time. This will prevent a Conditional Revalidation of this response.\" \r\n\r\nWhereas on the ones served from the CDN:\r\nHTTP/1.1 ETAG Header is present: 0x8D346A87CB7AC38\r\n\r\n\t!! WARNING: The ETAG header value MUST be a quoted-string.\r\nHTTP Last-Modified Header is present: Mon, 07 Mar 2016 16:49:45 GMT\r\n\r\nSo if I'm reading this right, and I'm not an expert on HTTP caching, it looks like the FileSystemProvider needs to set that ETAG or Last-Modified time header if the cache directives will have any benefits at all, else the browser is forced to revalidate. "}}