Skip to content

feat: Get Content-Type from CLI argument#13

Open
entrity wants to merge 1 commit into
jessepeterson:mainfrom
entrity:content-type-param
Open

feat: Get Content-Type from CLI argument#13
entrity wants to merge 1 commit into
jessepeterson:mainfrom
entrity:content-type-param

Conversation

@entrity
Copy link
Copy Markdown

@entrity entrity commented Nov 18, 2025

🎯 Motivation

Some MDM servers may require a particular Content-Type header value for posted data. We aim to let users specify a value.

🦋 What's changed

  • A command-line argument --content-type is added.

  • The default Content-Type value is changed from application/octet-stream to application/x-pki-message.

🔗 References

Closes #12

🎯 Motivation

Some MDM servers may require a particular Content-Type header value for
posted data. We aim to let users specify a value.

🦋 What's changed

- A command-line argument `--content-type` is added.

- The default Content-Type value is changed from
  `application/octet-stream` to `application/x-pki-message`.

🔗 References

Closes jessepeterson#12
@entrity
Copy link
Copy Markdown
Author

entrity commented Nov 18, 2025

I am not familiar with golang projects, so any requests for changes are welcome.

Comment thread scepclient/scepclient.go
"github.com/smallstep/scep"
)

var RequestContentType = "application/x-pki-message"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Generally we want to stay away from global variables. This can just be a property on the client struct (since that's where it's used) and initialized as an option in the client.

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.

Use 'application/x-pki-message` instead of 'application/octet-stream'?

2 participants