<div dir="ltr"><div dir="ltr"><div>Here is the doubtful sentence in 9.2.3.4 of the current</div><div>OPC draft:</div><div><br></div><div><br></div><div><span style="white-space:pre"> </span>The comparison might be case-sensitive and</div><div><span style="white-space:pre"> </span>include every character regardless of the role</div><div><span style="white-space:pre"> </span>it plays in the content-type grammar of RFC</div><div><span style="white-space:pre"> </span>7231, or it might follow the grammar of RFC</div><div><span style="white-space:pre"> </span>7231.</div><div><br></div><div>1) sensitive or insensitive?</div><div><br></div><div>I find that media types in .Net are case insensitive.</div><div>I executed the following F# code and the result is</div><div>"case insensitive".</div><div><br></div><div> let mt1 =</div><div> System.Nt.Mime.ContentType("application/xml")</div><div> let mt2 =</div><div> System.Net.Mime.ContentType("Application/Xml")</div><div><br></div><div> if mt1 = mt2 then</div><div> printfn "case insensitive"</div><div> else printfn "case senstive"</div><div><br></div><div><br></div><div>How harmful if an OPC implementation does not handle content types in</div><div>a case-sensitive manner? If programmers specify "Application/Xml" and</div><div>an OPC package has the following Override element, programmers</div><div>will get an unexpected result.</div><div><br></div><div> <Override PartName="/a.xml" ContentType="application/xml" /></div><div><br></div><div>But do such an OPC implementation create problematic OPC packages?</div><div>Suppose that an OPC package aleady contains:</div><div><br></div><div> <Default Extension="xml" ContentType="application/xml" /></div><div><br></div><div>If a programmer would like to add another part /a.xml of</div><div>"Application/Xml", a package will have</div><div><br></div><div> <Override PartName="/a.xml" ContentType="Application/Xml" /></div><div><br></div><div>Although this Override element is unnecessary, it is not extremely</div><div>harmful. Correct OPC implementations will have no problems even</div><div>if they encounter such unnecessary Override elements.</div><div><br></div><div>I propose to disallow case-sensitive comparison of media types</div><div>but add a note.</div><div><br></div><div>Note: The previous edition of this document did not disallow</div><div>case-sensitive comparison.</div><div><br></div><div>2) the content-type grammar of RFC 7231</div><div><br></div><div>I am puzzled by the doubtful sentence quoted above.</div><div>First, the synax in RFC 7231 is shown below:</div><div><br></div><div>Syntax:</div><div><br></div><div> media-type = type "/" subtype *( OWS ";" OWS parameter )</div><div> type = token</div><div> subtype = token</div><div> parameter = token "=" ( token / quoted-string )</div><div><br></div><div>Examples:</div><div><br></div><div> text/html;charset=utf-8</div><div> text/html;charset=UTF-8</div><div> Text/HTML;Charset="utf-8"</div><div> text/html; charset="utf-8"</div><div><br></div><div>What does the sentence mean?</div><div><br></div><div>Regards,</div><div>Makoto</div></div></div>
<br><br>
<FONT style="BACKGROUND-COLOR: #ffffff">
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">Click <a href=https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ== >here</a> to report this email as spam.</FONT></P></FONT>
<br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by Forcepoint. </FONT><A href="http://www.forcepoint.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.forcepoint.com</FONT></A></P>