none
Azure Blob (CDN) returning two different versions depending on header Accept-Encoding

    Question

  • I have a blob surfaced via a CDN.  Below are two different requests, I pulled this via fiddler2.  For some reason, adding or removing the Accept-Encoding header changes the result.  How is this happening?  Is there a way to fix it, so I only get the latest version regardless of the encoding header?  I am using CloudBerry to upload the file.  It almost seems like two versions were uploaded, one with the encoding and one with-out.  But I can't figure out how to remove the old one from the blob storage.

    Thanks for any advice or help!

     

    HEADER 1
    GET http://az29926.vo.msecnd.net/content/js/_site.js HTTP/1.1
    Accept: application/javascript, */*;q=0.8
    Referer: http://new.TEST.com/
    Accept-Language: en-US
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MAAU)
    Host: az29926.vo.msecnd.net
    Connection: Keep-Alive
    Pragma: no-cache
    Accept-Encoding: gzip, deflate

    HEADER 2
    GET http://az29926.vo.msecnd.net/content/js/_site.js HTTP/1.1
    Accept: application/javascript, */*;q=0.8
    Referer: http://new.TEST.com/
    Accept-Language: en-US
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MAAU)
    Host: az29926.vo.msecnd.net
    Connection: Keep-Alive
    Pragma: no-cache

     

    Results

    HEADER 1 RESULT
    HTTP/1.1 200 OK
    Content-Length: 7661
    Content-Type: application/x-javascript
    ETag: 0x8CDF0160206E798
    Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id: 625c645b-f238-4cc9-953b-cf12ec50a5c0
    x-ms-version: 2009-09-19
    x-ms-meta-CbModifiedTime: Tue, 31 May 2011 13:08:57 GMT
    x-ms-lease-status: unlocked
    x-ms-blob-type: BlockBlob
    Age: 15650
    Date: Mon, 06 Jun 2011 19:04:09 GMT
    Last-Modified: Fri, 03 Jun 2011 14:59:44 GMT
    Connection: keep-alive
    Cache-Control: no-cache

    HEADER 2 RESULT
    HTTP/1.1 200 OK
    Content-Length: 8875
    Content-Type: application/x-javascript
    Last-Modified: Mon, 06 Jun 2011 18:15:45 GMT
    ETag: 0x8CDF28CE3987706
    Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id: 39f66001-0a43-4b88-95d2-ac1308208a2b
    x-ms-version: 2009-09-19
    x-ms-meta-CbModifiedTime: Mon, 06 Jun 2011 17:30:08 GMT
    x-ms-lease-status: unlocked
    x-ms-blob-type: BlockBlob
    Date: Mon, 06 Jun 2011 19:03:46 GMT
    Connection: keep-alive
    Cache-Control: no-cache

    Monday, June 06, 2011 7:12 PM

Answers

All replies

  • Having an answer to this would be great.  But I have versioned all my content and have taken care of this problem, since I get an entirly new version when I make a change.  The advice I see around the net seems to suggest this is the way to go.

    Monday, June 06, 2011 10:03 PM
  • Hi Adam,

    > Azure Blob (CDN) returning two different versions depending on header Accept-Encoding.

    From your description, it seems like the blob storage is providing compressed content when Accept-Encoding header is specified. Actually this is a feature which is not implemented yet. We can see the feature is requested at http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/1074433-automatic-http-compression-on-azure-blob-cdn-gzip.

    Once the blob storage implements this feature, it will behave exactly the same as you described. Unfortunately there is no document and evidence showing this feature is compeleted. And also I am not able to reproduce this behavior on my side.

    May I ask if you receive the compressed content when send the GET request with a Accept-Encoding header to the blob storage instead of CDN?

    Also you may want to confirm with our support team whether this feature has been added in blob storage or not via http://www.microsoft.com/windowsazure/support/.

    Thanks,


    Wengchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    • Marked as answer by Wenchao Zeng Monday, June 13, 2011 2:16 AM
    Tuesday, June 07, 2011 10:12 AM