-
Notifications
You must be signed in to change notification settings - Fork 432
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
Charset variable includes a Content-Type attribute after "charset" #718
Comments
vaabr
added a commit
to vaabr/fuel
that referenced
this issue
Jun 5, 2020
Added substringBefore to exclude any parameters after the charset parameter and fix the issue.
vaabr
added a commit
to vaabr/fuel
that referenced
this issue
Jun 5, 2020
Added unit test that replicates the conditions kittinunf#718 was encountered under and verifies the fix
kittinunf
pushed a commit
that referenced
this issue
Jun 6, 2020
vaabr
added a commit
to vaabr/fuel
that referenced
this issue
Jun 6, 2020
As per SleeplessByte comment, my previous changes did not fix the root of the kittinunf#718 issue and it still occured if the order of parameters was different. In this commit I have fixed the issue, added unit tests to prove that and changed the default encoding to ASCII
kittinunf
pushed a commit
that referenced
this issue
Jun 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Description
Charset variable in
com.github.kittinunf.fuel.core.BodyRepresentation.kt
includes an attribute after the charset which invokesjava.nio.charset.IllegalCharsetNameException: UTF-8; API-VERSION=5.1
. Azure DevOps sends this as the Content-Type:application/json; charset=utf-8; api-version=5.1
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
TEXT_CONTENT_TYPE regex excludes attributes after the charset
Environment
Development Machine
Additional context
ADO reference:
https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/create?view=azure-devops-rest-5.1
UPD:
I have found a possible solution:
In com.github.kittinunf.fuel.core.BodyRepresentation.kt in the string 22 replace
with
Since the second group is
; charset=utf-8; api-version=5.1
it substrings the charset attribute value.The text was updated successfully, but these errors were encountered: