Skip to content

502 Errors for content disposition encoded in Base64 #2076

@alkampfergit

Description

@alkampfergit

I have intermittent error calling an api that download a document and I find that the error is the following one.

"ResponseHeaders": The destination returned a response that cannot be proxied back to the client.
System.InvalidOperationException: Invalid non-ASCII or control character in header: 0x00C2

Actually I have this exact response-header in original response.

Content-disposition: attachment; filename="=?utf-8?B?T0YwMTMxNjEgLSAxsCBMaW5lYQ==?="

It seems that YARP does not like RFC2045 encoding, actually decoding from Base-64 cyber chef reports valid UTF-8 base64 encoded

To Reproduce

Just proxy a request that returned the exact content-disposition header.

I'm using version 2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions