Mercurial > hg > orthanc
annotate README @ 2248:69b0f4e8a49b
Escape multipart type parameter value in Content-Type header
## Summary
Multipart responses do not quote/escape the value of their type
parameter (the subtype) even though it always contains at least one
special character (the slash "/"), which confuses standard-compliant
HTTP clients.
## Details
The Content-Type header in HTTP is in RFC 7231, Section 3.1.1.5:
https://tools.ietf.org/html/rfc7231#section-3.1.1.5
The section defers to the media type section (3.1.1.1) for the syntax of
the media type:
https://tools.ietf.org/html/rfc7231#section-3.1.1.1
This states that a parameter value can be quoted:
parameter = token "=" ( token / quoted-string )
A parameter value that matches the token production can be transmitted
either as a token or within a quoted-string. The quoted and unquoted
values are equivalent.
Tokens are defined in RFC 7230, Section 3.2.6 (via RFC 7231, appendix
C):
https://tools.ietf.org/html/rfc7231#appendix-C
https://tools.ietf.org/html/rfc7230#section-3.2.6
Here we observe that tokens cannot contain a slash "/" character:
token = 1*tchar
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
/ "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
/ DIGIT / ALPHA
; any VCHAR, except delimiters
Delimiters are chosen from the set of US-ASCII visual characters not
allowed in a token (DQUOTE and "(),/:;<=>?@[\]{}").
However, the current implementation does not quote/escape the value of
the type parameter:
multipart/related; type=application/dicom
Instead, it should be:
multipart/related; type="application/dicom"
All of this also seems to apply to the MIME Content-Type header
definition, even though it is a little different:
https://www.iana.org/assignments/message-headers
https://tools.ietf.org/html/rfc2045#section-5.1
https://tools.ietf.org/html/rfc2387
author | Thibault Nélis <tn@osimis.io> |
---|---|
date | Mon, 16 Jan 2017 13:07:11 +0100 |
parents | 630606097798 |
children | b2f57399b067 |
rev | line source |
---|---|
57 | 1 Orthanc - A Lightweight, RESTful DICOM Server |
2 ============================================= | |
3 | |
0 | 4 |
5 General Information | |
6 ------------------- | |
7 | |
705 | 8 General information about this software can be found on its official |
9 Website: | |
10 http://www.orthanc-server.com/ | |
0 | 11 |
57 | 12 The instructions for building Orthanc can be found in the "INSTALL" |
0 | 13 file. |
14 | |
15 | |
16 Supported Platforms | |
17 ------------------- | |
18 | |
2086 | 19 Currently, the officially supported platforms are: |
0 | 20 |
2086 | 21 * GNU/Linux (32bit and 64bit). |
7 | 22 * Windows 32bit. |
2086 | 23 * Apple OS X (32bit and 64bit). |
0 | 24 |
25 | |
26 Supported Toolchains | |
27 -------------------- | |
28 | |
57 | 29 Orthanc can currently be built using the following compiling |
0 | 30 toolchains: |
31 | |
2086 | 32 * Native GNU/Linux compilation, with gcc. |
7 | 33 * Native Windows compilation, with Microsoft Visual Studio. |
2086 | 34 * Cross-compilation for Windows under GNU/Linux, with MinGW. |
0 | 35 |
36 | |
17 | 37 Licensing |
38 --------- | |
39 | |
136 | 40 Orthanc is licensed under the GPLv3 license, with the OpenSSL |
41 exception: | |
42 http://people.gnome.org/~markmc/openssl-and-the-gpl.html | |
43 | |
1230
4f1ac0f2c39c
Fix licensing terms according to FSF recommendations
s.jodogne@gmail.com
parents:
705
diff
changeset
|
44 We also kindly ask scientific works and clinical studies that make |
4f1ac0f2c39c
Fix licensing terms according to FSF recommendations
s.jodogne@gmail.com
parents:
705
diff
changeset
|
45 use of Orthanc to cite Orthanc in their associated publications. |
4f1ac0f2c39c
Fix licensing terms according to FSF recommendations
s.jodogne@gmail.com
parents:
705
diff
changeset
|
46 Similarly, we ask open-source and closed-source products that make |
4f1ac0f2c39c
Fix licensing terms according to FSF recommendations
s.jodogne@gmail.com
parents:
705
diff
changeset
|
47 use of Orthanc to warn us about this use. You can cite our work |
4f1ac0f2c39c
Fix licensing terms according to FSF recommendations
s.jodogne@gmail.com
parents:
705
diff
changeset
|
48 using the following BibTeX entry: |
17 | 49 |
449 | 50 @inproceedings{Jodogne:ISBI2013, |
563 | 51 author = {Jodogne, S. and Bernard, C. and Devillers, M. and Lenaerts, E. and Coucke, P.}, |
52 title = {Orthanc -- {A} Lightweight, {REST}ful {DICOM} Server for Healthcare and Medical Research}, | |
53 booktitle={Biomedical Imaging ({ISBI}), {IEEE} 10th International Symposium on}, | |
54 year={2013}, | |
55 pages={190-193}, | |
56 ISSN={1945-7928}, | |
57 month=apr, | |
58 url={http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6556444}, | |
59 address={San Francisco, {CA}, {USA}} | |
449 | 60 } |
17 | 61 |
62 | |
63 Licensing of special directories | |
64 -------------------------------- | |
65 | |
66 The following directories have separate licensing terms: | |
67 | |
68 * The file of the "Core/SQLite/" directory are licensed under the | |
69 3-clause BSD license, as they are derived from the Chromium project. | |
70 | |
71 | |
0 | 72 Content |
73 ------- | |
74 | |
75 This archive contains the following directories: | |
76 | |
77 * Core/ - The core C++ classes (independent of DCMTK) | |
57 | 78 * OrthancExplorer/ - Code of the Web application (HTML5/Javascript) |
79 * OrthancServer/ - Code of the Orthanc server (depends on DCMTK) | |
1253 | 80 * Plugins/ - Code of the plugin framework |
0 | 81 * Resources/ - Scripts, resources for building third-party code |
1253 | 82 * UnitTestsSources/ - Unit tests |
0 | 83 |
84 This archive contains the following files: | |
85 | |
86 * AUTHORS - The list of the authors | |
87 * CMakeLists.txt - The main build script | |
88 * COPYING - The GPLv3 license | |
57 | 89 * INSTALL - How to build Orthanc |
0 | 90 * README - This file |
91 * THANKS - The list of the contributors | |
7 | 92 * NEWS - The history of main changes between versions |
0 | 93 |
7 | 94 We have decided not to maintain a separate "ChangeLog" file. Each |
57 | 95 commit to the official Orthanc Mercurial repository should be |
7 | 96 associated with a description of the changes. |