8000 Dio is forcing headers to lowercase · Issue #641 · cfug/dio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dio is forcing headers to lowercase #641
Closed
@shaxxx

Description

@shaxxx

Dio version: dio: ^3.0.8

When I set Dio header like this

dio.options.headers['Authorization'] = 'dGVzdDp0ZXN0';

I expect request header to look like this

Authorization: Basic dGVzdDp0ZXN0

Not like this (notice that capital "A" was transformed to "a")

authorization: Basic dGVzdDp0ZXN0

Reason for this is HERE. All headers are transformed to lower case.
I can only guess what your motivation for this was, but this is wrong.

Please read about it HERE and HERE

Even Dart team is currently reverting this
https://dart-review.googlesource.com/c/sdk/+/119100

Dio 2.1.5 did not have this behavior. I was able to use AltHttpClient with Dio and headers where left AS IS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0