gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.49k stars 775 forks source link

BUG: The attribute "_mimeType" in HTTPResponse class is Content-Type ,not Mimetype #1528

Closed wuqi closed 4 years ago

wuqi commented 4 years ago
<map name="global">
    <XYZImage name="tianditu">
        <url>http://t[0123456].tianditu.gov.cn/DataServer?T=img_w&amp;x={x}&amp;y={y}&amp;l={z}&amp;tk=ad35cd75813c382cace9dc59535ee4d6</url>
        <profile>spherical-mercator</profile>
        <cache_policy usage="none"/>
        <attribution>&#169;tianditu contributors</attribution>    
    </XYZImage>
</map>

When I use this earth file ,the mimetype is "image/jpeg; charset=utf8",in file HttpClient.cpp,line 1522,so the function "osgDB::Registry::instance()->getReaderWriterForMimeType(mimeType)" returns NULL,then I get a blank ball. The mimetype in HTTPResponse class actually is Content-Type ,not Mimetype

gwaldron commented 4 years ago

I believe this is actually a server problem. It does not make sense to append a charset for a binary mime type like image/jpeg.