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

fix: use UTF-8 as a default encoding in HTTP sampler #6010

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

vlsi
Copy link
Collaborator

@vlsi vlsi commented Jun 26, 2023

In PR 5987 HTTP sampler encoded filenames with percent encoding, however, it should not encode all the characters.

Fixes #6005

This is a fixup to #5987

Motivation and Context

HTTP sampler should send requests like browsers do: UTF-8 encoded filenames.

@vlsi vlsi added the defect label Jun 26, 2023
@vlsi vlsi added this to the 5.6.1 milestone Jun 26, 2023
@vlsi vlsi force-pushed the filename_encoding branch 7 times, most recently from 3b110ed to 5bfceca Compare June 28, 2023 15:40
Comment on lines +132 to +133
default:
sb.append(c);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, % should be escaped as well so the server-side can tell the difference between ".txt and %22.txt, however, current Chrome does not escape %, so when they change we change

In PR 5987 HTTP sampler encoded filenames with percent encoding,
however, it should not encode all the characters.

Fixes apache#6005
This is a fixup to apache#5987
@vlsi vlsi force-pushed the filename_encoding branch from 5bfceca to 7450e4b Compare June 29, 2023 08:19
@vlsi vlsi merged commit 7450e4b into apache:master Jun 29, 2023
@vlsi vlsi deleted the filename_encoding branch December 27, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider UTF-8 as the default HTTP encoding
1 participant