<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial'; COLOR: #000000; FONT-SIZE: 10pt">
<DIV><FONT size=3>I have been using Mapproxy 1.4 with mod_wsgi and Apache HTTP
Server on my Windows machine for about a month and it has done a great job
reprojecting different WMS sources from a local EPSG into GLOBAL_MERCATOR.
Recently though I found a WMS source which Mapproxy cannot handle, probably
since the Content-Type header is missing in the WMS server's response.
</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>These are the response headers from the WMS source (using
Firefox with the HttpFox extension):</FONT></DIV>
<DIV><EM><FONT size=3>(Status-Line) HTTP/1.1 200
OK</FONT></EM></DIV>
<DIV><EM><FONT size=3>Server
Apache-Coyote/1.1</FONT></EM></DIV>
<DIV><EM><FONT size=3>Transfer-Encoding
chunked</FONT></EM></DIV>
<DIV><EM><FONT size=3>Date Sun, 28 Oct 2012 12:35:39
GMT</FONT></EM></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>And for reference, these are the response headers from another
WMS source which works fine in Mapproxy:</FONT></DIV>
<DIV><EM><FONT size=3>(Status-Line) HTTP/1.1 200
OK</FONT></EM></DIV>
<DIV><EM><FONT size=3>Date Sun, 28 Oct 2012 12:41:48
GMT</FONT></EM></DIV>
<DIV><EM><FONT size=3>Server
Apache-Coyote/1.1</FONT></EM></DIV>
<DIV><EM><FONT size=3>Cache-Control max-age=7200,
must-revalidate</FONT></EM></DIV>
<DIV><EM><FONT size=3>Expires Sun, 28 Oct 2012 14:41:40
GMT</FONT></EM></DIV>
<DIV><EM><FONT size=3>geowebcache-tile-index [2669, 1437,
13]</FONT></EM></DIV>
<DIV><EM><FONT size=3>Content-Type image/png</FONT></EM></DIV>
<DIV><EM><FONT size=3>Content-Length 80140</FONT></EM></DIV>
<DIV><EM><FONT size=3>Connection close</FONT></EM></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>Apart from the missing Content-Type header there is nothing
wrong with the actual reponse from the WMS source. It serves the expected png
tiles which I have verified by copying request urls from
<EM>source-requests.log</EM> into the address field of my web browser, which
displays the images correctly. Still, no layers are displayed in the Open Layers
Client on the Mapproxy Demos page, and when I input the url to a tile that
Mapproxy tries to serve (</FONT><A
href="http://localhost/mapproxy/service?...)"><FONT
size=3>http://localhost/mapproxy/service?...)</FONT></A><FONT size=3> I get the
following exception: </FONT></DIV>
<DIV><FONT size=3 face="Courier New"><ServiceException>Could not get any
sources: </FONT><FONT size=3 face="Courier New">response from source WMS has no
Content-type header</ServiceException></FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>Question:</FONT></DIV>
<DIV><FONT size=3>Is there any way of telling Mapproxy explicitly that the
incoming content is a png image? The only requests I make are for png images, so
it probably wouldn't complicate matters if I let Mapproxy somehow assume that
the source content is always a png image when the Content-Type header is
missing.</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>I'm a basic user and no programmer but I can see that the
ServiceException above is generated by <EM>wms.py</EM> in the client folder. To
try to understand how Mapproxy makes requests and handles reponses I have looked
at several of the .py files but it gets a bit overwhelming so I would be really
grateful if someone could tell me if and how this problem could be
solved.</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>Thanks,</FONT></DIV>
<DIV><FONT size=3>Magnus</FONT></DIV></DIV></DIV></BODY></HTML>