Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicholas Bailey
rust-gitlab
Commits
beccce2f
Commit
beccce2f
authored
May 27, 2020
by
Ben Boeckel
⛰
Browse files
api/projects: use the actual encoding for the contents
parent
cbeb99d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
beccce2f
...
...
@@ -24,6 +24,9 @@ been added.
for their
`query`
fields.
*
The
`api::projects::protected_branches::UnprotectBranch`
endpoint now
properly escapes branch names with URL-special characters.
*
The
`api::projects::repository::CreateFile`
endpoint now properly upgrades
the encoding when attempting to encode binary contents using
`Encoding::Text`
.
## Changes
...
...
src/api/projects/repository/files/create.rs
View file @
beccce2f
...
...
@@ -154,7 +154,10 @@ impl<'a> Endpoint for CreateFile<'a> {
}
else
{
encoding
};
params
.push
(
"content"
,
encoding
.encode
(
content
.ok
(),
&
self
.content
));
params
.push
(
"content"
,
actual_encoding
.encode
(
content
.ok
(),
&
self
.content
),
);
self
.encoding
// Use the actual encoding.
.map
(|
_
|
actual_encoding
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment