Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Content-type Multiple Parameters

As per the RFC link Hypertext Transfer Protocol -- HTTP/1.1content-type is defined as

 Content-Type   = "Content-Type" ":" media-type

Media-type is defined as

media-type     = type "/" subtype *( ";" parameter )
type           = token
subtype        = token

So, as per this

ContentType: application/soap+xml; charset=utf-8

is a valid. Can a ContentType have multiple parameters? For example:

ContentType: application/soap+xml; charset=utf-8; action="urn:CreateCredential"

Regards

like image 222
tanish Avatar asked Oct 23 '25 18:10

tanish


1 Answers

The current spec is RFC 7231, not RFC 2616.

But yes:

*( ";" parameter )

indicates that there can be multiple parameters.

like image 99
Julian Reschke Avatar answered Oct 26 '25 13:10

Julian Reschke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!