Question

If I call CloudBlockBlob.SetMetadataAsync from the Azure Storage SDK (3.1.0.1) updating metadata, all new values are in headers of request. This request is PUT and on Microsoft's .NET it contains Content-Length header (value 0). But if I run this under Mono 3.4.0 (exact version below) the header is missing and Azure Storage gives me 411.

Anybody encountered this? And idea how to fix this (I was not lucky so far to extract test case without Azure Storage SDK)?

Mono:

Mono JIT compiler version 3.4.0 ((no/d4511ef Wed Apr 30 12:04:56 CEST 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       normal
        Notifications: epoll
        Architecture:  armel,vfp+hard
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

Request from Mono:

PUT /XXX?comp=metadata&timeout=360 HTTP/1.1
User-Agent: WA-Storage/3.1.0.1 (.NET CLR 4.0.30319.17020; Unix 3.10.25.0)
x-ms-version: 2013-08-15
x-ms-client-request-id: 910f1ad9-d877-4548-97d9-34d5d67950d9
x-ms-meta-XXX: DEAD8E77A7AB25FE13E121CF3C05A19A215D3CCD
x-ms-meta-XXX: 2013-02-11T09:25:59.0000000+00:00
x-ms-date: Thu, 01 May 2014 17:49:21 GMT
Authorization: SharedKey XXX:XXX
Host: XXX

Request from Microsoft's .NET:

PUT /XXX?comp=metadata&timeout=360 HTTP/1.1
User-Agent: WA-Storage/3.1.0.1 (.NET CLR 4.0.30319.34014; Win32NT 6.2.9200.0)
x-ms-version: 2013-08-15
x-ms-client-request-id: 5b5ce8ea-ee2a-4a3b-900e-84e6bbeb1642
x-ms-meta-XXX: DEAD8E77A7AB25FE13E121CF3C05A19A215D3CCD
x-ms-meta-XXX: 2013-02-11T09:25:59.9999999+00:00
x-ms-date: Thu, 01 May 2014 17:55:04 GMT
Authorization: SharedKey XXX:XXX
Host: XXX
Content-Length: 0
Was it helpful?

Solution

You seem to be being affected by a recent regression in Mono. But you may be lucky enough to know that it could be already been fixed in this commit in mono master. Please compile mono master yourself and test with it. If it still doesn't fix your problem, please report it as a bug in http://bugzilla.xamarin.com with a minimal testcase.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top