Skip to content

docs(network): use lower-cased header name in delete header samples - #42573

Open
Armin Azar (armin-azar) wants to merge 1 commit into
microsoft:mainfrom
armin-azar:docs-route-header-case
Open

docs(network): use lower-cased header name in delete header samples#42573
Armin Azar (armin-azar) wants to merge 1 commit into
microsoft:mainfrom
armin-azar:docs-route-header-case

Conversation

@armin-azar

Copy link
Copy Markdown

Summary

  • request.headers() returns lower-cased header names, so X-Secret never matches and the "Delete header" samples for JavaScript, Java and C# silently leave the header in place instead of removing it.
  • Lowercased the key in those three samples so they do what the surrounding text says. The Python samples already used the lower-cased name.

request.headers() returns lower-cased header names, so removing
"X-Secret" never matches. The JavaScript, Java and C# samples silently
keep the header instead of removing it as the surrounding text states.
The Python samples already use the lower-cased name.
@armin-azar

Copy link
Copy Markdown
Author

Max Schmitt (@mxschmitt) mind taking a look when you get a chance? Small one. The delete header samples use X-Secret, but request.headers() returns lower-cased names, so that delete never matches and the header survives. This just lower-cases the key in the JS, Java and C# samples. Python was already correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant