<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<link href="chrome://translator/skin/floatingPanel.css"
type="text/css" rel="stylesheet">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2012-10-29 08:36, Oliver Tonnhofer
wrote :<br>
</div>
<blockquote
cite="mid:E0756C5A-8E27-4110-BF22-8DE5CE581E6A@omniscale.de"
type="cite">
<pre wrap="">On 28.10.2012, at 15:12, Magnus E wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap="">There is no configuration option for that. But maybe MapProxy is checking too much in this case? I can change this check to only compare the Content-Type if it is present. Other parts of MapProxy already handle data that is not a valid image and MapProxy also checks for the HTTP status code (2xx).
</pre>
</blockquote>
Without a Content-Type, or rather a Mime-Type, the filename
extension is normally used.<br>
With no extension either, Linux tests the magic (first) bytes of the
file against a type match.<br>
See <i><b>man file</b></i> for an extended description.<br>
But, of course, the assumed type you requested is a perfect
candidate.<br>
If you want a double check, you may test the magic bytes or have the
<i><b>file</b></i> command do it.<br>
<br>
While waiting, Magnus might want to pipe the stream through a filter
to add the C-T line.<br>
I met a problem following the links of StreamEdit below but there
must be other filters.<br>
It probably takes less time building a patched mapproxy than to
elaborate that filter ;-)<br>
<br>
Best regards,<br>
<br>
<table>
<tbody>
<tr>
<td valign="top">André.</td>
</tr>
</tbody>
</table>
<br>
<div class="pr_title"><a
href="http://www.easyfreeware.com/streamedit-22043-freeware.html">StreamEdit
1.0b2</a><br>
</div>
<p align="justify"> Advertisements: <br>
</p>
<p align="justify"> \Intercept &\; modify TCP or UDP streams.
StreamEdit is a utility that allows you to modify a TCP 'stream'
or UDP datagrams. It does this by tunnelling the data through
itself and then allow you to edit it arbitrarly or use real-time
filters. Those filters can modify the data or trigger actions. The
main purpose of StreamEdit is security analysis, but it can serve
many more. From protocol analysis to intrusion detection testing,
possibilities are endless.\<br>
<br>
</p>
<br>
<br>
<br>
<br>
<div style="bottom: auto; left: 0px; right: auto; top: 143px;
display: none;" class="translator-theme-default"
id="translator-floating-panel"> </div>
</body>
</html>