[BUG] The value for one of the HTTP headers is not in the correct format
See original GitHub issueDescribe the bug An error occurs when attempting an operation while connected to local storage
Expected behavior The requested operation should succeed
Actual behavior Error message:
The value for one of the HTTP headers is not in the correct format
MyApp.Tests.SyncManagerTests.GetDownloads
Source: SyncManagerTests.vb line 63
Duration: 1 ms
Message:
System.AggregateException : One or more errors occurred.
---- Azure.RequestFailedException : The value for one of the HTTP headers is not in the correct format.
RequestId:f97f3379-f5db-40ca-b089-9365321e9a25
Time:2020-08-15T23:44:45.932Z
Status: 400 (The value for one of the HTTP headers is not in the correct format.)
ErrorCode: InvalidHeaderValue
Headers:
x-ms-error-code: InvalidHeaderValue
x-ms-request-id: f97f3379-f5db-40ca-b089-9365321e9a25
Connection: keep-alive
Transfer-Encoding: chunked
Date: Sat, 15 Aug 2020 23:44:45 GMT
Server: Azurite-Blob/3.7.0
Content-Type: application/xml
Stack Trace:
Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
Task`1.GetResultCore(Boolean waitCompletionNotification)
Task`1.get_Result()
SyncManagerTests.ctor(ITestOutputHelper Output) line 22
----- Inner Stack Trace -----
Container.ListBlobsFlatSegmentAsync_CreateResponse(ClientDiagnostics clientDiagnostics, Response response)
<ListBlobsFlatSegmentAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
TaskAwaiter.ThrowForNonSuccess(Task task)
TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
<GetBlobsInternal>d__74.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
TaskAwaiter.ThrowForNonSuccess(Task task)
TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
<GetNextPageAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
TaskAwaiter.ThrowForNonSuccess(Task task)
TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
ValueTask`1.get_Result()
ConfiguredValueTaskAwaiter.GetResult()
<GetAsyncEnumerator>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
Boolean>.GetResult(Int16 token)
ValueTaskAwaiter`1.GetResult()
VB$StateMachine_9_GetSyncManagerAsync.MoveNext() line 110
To Reproduce
- Using v12.4.4, connect to local storage
- Perform an operation (e.g.
oClient.GetBlobsAsync.GetAsyncEnumerator.MoveNextAsync
) - Note that the operation succeeds
- Repeat steps 1 & 2 using v12.5.0
- Note that the operation fails, resulting in the error above
- Insufficient information is provided for determining which header is in error, and why
Environment
- Azure.Storage.Blobs 12.5.0
- Windows 10 .NET Framework 4.72
- Visual Studio 16.6.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Error: The value for one of the HTTP headers is not in ...
"The value for one of the HTTP headers is not in the correct format," suggests that one or more of the HTTP headers...
Read more >Fails with 'The value for one of the HTTP headers is not ...
Cannot create a container - 'The value for one of the HTTP headers is not in the correct format' using the recommended "UseDevelopmentStorage= ......
Read more >Azure File Storage URL in browser showing ...
I am trying to access the URL given in Azure for a file on the Azure File Storage format, however I am getting...
Read more >Azure.RequestFailedException: The value for one of the HTTP ...
RequestFailedException : The value for one of the HTTP headers is not in the correct format. The detailed error message looks like the...
Read more >The value for one of the HTTP headers is not in ... - Joe Blogs
RequestFailedException : The value for one of the HTTP headers is not in the correct format – Azurite with Docker + dotnet core....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@seanmcc-msft
I was mistaken in my original report. I claimed that the error was occurring with both local and cloud storage. In fact, it was only occurring with local storage (Azurite, in this case). I’ve updated the report accordingly.
The problem is solved. I turned out I hadn’t updated the server along with the client SDK. Once I did that, killed the Node process and restarted Azurite, everything worked as expected:
Note: this assumes that Azurite was installed with the
-g
switch.The headers from Fiddler were the tipoff:
Request
Response
Note the
HeaderName
andHeaderValue
elements in the captured XML response stream. This was the problem. So thank you for asking for that—it helped me arrive at the solution.However, this header information could be included in the exception thrown by the SDK. It would make things a lot easier. I’d like to submit this as a feature request.
Me too with version 12.5.0. version 12.4.4 works fine.