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

Content type header is inaccurate #12728

Closed
cander opened this issue Aug 1, 2018 — with docs.microsoft.com · 5 comments
Closed

Content type header is inaccurate #12728

cander opened this issue Aug 1, 2018 — with docs.microsoft.com · 5 comments

Comments

Copy link

@cander cander commented Aug 1, 2018 — with docs.microsoft.com

The sample request to create a user includes:

POST https://.../scim/Users HTTP/1.1
 Authorization: Bearer ...
 Content-type: application/json

However, the content type header that comes in with the request is actually:

Content-Type: application/scim+json; charset=utf-8

The difference between "json" and "scim+json" was causing my Ruby on Rails app to not see any of the parameters being passed into the create/POST request. I assume update/PATCH request content type is also "scim+json" instead of "json", as shown in the documentation.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@MohitGargMSFT
Copy link
Member

@MohitGargMSFT MohitGargMSFT commented Aug 1, 2018

@cander Thanks for your feedback! We will investigate and update as appropriate.

Loading

@MohitGargMSFT
Copy link
Member

@MohitGargMSFT MohitGargMSFT commented Aug 1, 2018

@cander Thanks for reporting. I will work to fix it in document.

Loading

@leesmith
Copy link

@leesmith leesmith commented Sep 3, 2020

@cander I'm having the exact same problem here with my Rails app. Could you be so kind as to share how you registered the mime type in Rails? Thanks so much!

Loading

@PRMerger13 PRMerger13 added the Pri2 label Sep 3, 2020
@cander
Copy link
Author

@cander cander commented Sep 4, 2020

@leesmith - I don't recall the details, and I don't have access to the code base any more, but I did write a blog post that seems cryptic in retrospect, but maybe it will make sense. It links to a GitHub thread that may be helpful.

Loading

@leesmith
Copy link

@leesmith leesmith commented Sep 4, 2020

@cander No worries! I think I've figured it out. This seems to work for me:

config/initializers/mime_types.rb

Mime::Type.register "application/json", :json, %w(application/json application/scim+json)

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants