Commit 054ff63d6c2266d5ff68cbb8fcdfaa335b1e46d3
1 parent
795653bf
Exists in
master
update format detection : detect voTable with "application/xml" but also "text/xml"
Showing
1 changed file
with
15 additions
and
4 deletions
Show diff stats
server/kernel/src/File/FileFormatManager.cpp
... | ... | @@ -102,15 +102,26 @@ namespace TREPS |
102 | 102 | if (pos != string::npos) |
103 | 103 | type = type.substr(0,pos); |
104 | 104 | |
105 | + // detect voTable with "application/xml" but also "text/xml" | |
106 | + //VOTable detection (a VOTable is a xml file) | |
107 | + if (type.compare("application/xml") == 0 || type.compare("text/xml") == 0 ) | |
108 | + return FF_VOTABLE; | |
109 | + | |
105 | 110 | //ASCII file detection |
106 | 111 | if (type.find("text/") != string::npos) |
107 | 112 | return FF_ASCII; |
108 | 113 | |
114 | + //detect voTable with "application/xml" but also "text/xml" | |
115 | + //- move detection before ASCII file detection | |
109 | 116 | //VOTable detection (a VOTable is a xml file) |
110 | - if (type.compare("application/xml") == 0) | |
111 | - return FF_VOTABLE; | |
112 | - | |
113 | - if ((type.compare("application/octet-stream") == 0)) | |
117 | + //if (type.compare("application/xml") == 0) | |
118 | + // return FF_VOTABLE; | |
119 | + | |
120 | + // new kind of MINE found for netcdf | |
121 | + // File MIME Type : application/x-cdf\012- application/octet-stream; charset=binary | |
122 | + //ERROR - File format not supported | |
123 | + //if ((type.compare("application/octet-stream") == 0)) | |
124 | + if ((type.find("application/octet-stream") != string::npos)) | |
114 | 125 | { |
115 | 126 | //netcdf or cdf file detection |
116 | 127 | ... | ... |