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(runtime): ignore charset for Content-Type comparison (#951) #952

Merged
merged 1 commit into from
Sep 17, 2021
Merged

fix(runtime): ignore charset for Content-Type comparison (#951) #952

merged 1 commit into from
Sep 17, 2021

Conversation

jrtitus
Copy link
Contributor

@jrtitus jrtitus commented Sep 17, 2021

Fixes #951

Signed-off-by: Jeff Titus [email protected]

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • None affected. All tests pass with same coverage.
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)
  • No docs change required.

Testing Instructions

Tested scenario using local build

require github.com/edgexfoundry/app-functions-sdk-go/v2 v2.0.0
replace github.com/edgexfoundry/app-functions-sdk-go/v2 v2.0.0 => ../app-functions-sdk-go
# With charset
$ http :59770/api/v2/trigger Content-Type:"application/json; charset=utf-8" action=set deviceName=SomeDevice commandName=SomeCommand resourceName=SomeResource value=45
HTTP/1.1 200 OK
Content-Length: 36
Content-Type: application/json
Date: Fri, 17 Sep 2021 18:21:19 GMT

{
    "apiVersion": "v2",
    "statusCode": 200
}

# Without charset
$ http :59770/api/v2/trigger Content-Type:"application/json" action=set deviceName=SomeDevice commandName=SomeCommand resourceName=SomeResource value=45
HTTP/1.1 200 OK
Content-Length: 36
Content-Type: application/json
Date: Fri, 17 Sep 2021 18:21:19 GMT

{
    "apiVersion": "v2",
    "statusCode": 200
}

New Dependency Instructions (If applicable)

@codecov-commenter
Copy link

Codecov Report

Merging #952 (2e70cc3) into main (b86fbeb) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #952      +/-   ##
==========================================
+ Coverage   65.87%   65.89%   +0.01%     
==========================================
  Files          33       33              
  Lines        2532     2533       +1     
==========================================
+ Hits         1668     1669       +1     
  Misses        764      764              
  Partials      100      100              
Impacted Files Coverage Δ
internal/runtime/runtime.go 76.95% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b86fbeb...2e70cc3. Read the comment docs.

Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

@lenny-goodell lenny-goodell merged commit be777dc into edgexfoundry:main Sep 17, 2021
@jrtitus jrtitus deleted the fix/951-ignore-charset branch September 17, 2021 21:03
FelixTing pushed a commit to FelixTing/app-functions-sdk-go that referenced this pull request Mar 3, 2022
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.

Content-Type with charset causes failed pipeline
3 participants