Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid header parsing in Workflow HTTP request #4774

Closed
duncanhoggan opened this issue Nov 11, 2019 · 1 comment
Closed

Invalid header parsing in Workflow HTTP request #4774

duncanhoggan opened this issue Nov 11, 2019 · 1 comment
Milestone

Comments

@duncanhoggan
Copy link
Contributor

@duncanhoggan duncanhoggan commented Nov 11, 2019

Having a little issue with an http request from workflow.
It looks like the code doesn't cater for requests that have : characters in the value.
For reference from here

private IEnumerable<KeyValuePair<string, string>> ParseHeaders(string text)
        {
            if (string.IsNullOrWhiteSpace(text))
                return Enumerable.Empty<KeyValuePair<string, string>>();

            return
                from header in text.Split(new[] { "\r\n", "\n", "\r" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim())
                let pair = header.Split(':')
                where pair.Length == 2
                select new KeyValuePair<string, string>(pair[0], pair[1]);
        }

So if i was passing in the following as a header
Authorization: key=BAB3jQ6PE:BP91bEkXE9
The split would result in a pair length of 3 and no header would be added.

@duncanhoggan

This comment has been minimized.

Copy link
Contributor Author

@duncanhoggan duncanhoggan commented Nov 11, 2019

Referencing #4773

@sebastienros sebastienros added this to the 1.0 milestone Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.