'No response for proxied getMap request
I am using a proxy-script that is lying under URL/proxy/index.php
In the index.php I am replacing the URL with localhost:6081, the rest of the request stays the same.
// erzeuge einen neuen cURL-Handle
$ch = curl_init();
// setze die URL und andere Optionen
curl_setopt($ch, CURLOPT_URL, $new_request);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// führe die Aktion aus und gebe die Daten an den Browser weiter
$content = curl_exec($ch);
$fp = fopen("test.png",'x');
fwrite($fp, $content);
fclose($fp);
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
if ($contentType == 'text/html' || $contentType == 'text/plain' || $contentType == 'application/json'){
header("Content-type: ".$contentType."; charset=UTF-8");
} else {
header("Content-type: ".$contentType);
}
curl_close($ch);
echo($content);
The png I am getting in the script looks exactly how it should be looking as the return of the geoserver-request is executed properly. The response is empty, the preview-tab shows:
Image from URL/proxy/index.php/geoserver/UGE/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=UGE%3ALST_PLUS20_BRD&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A25832&STYLES=&BBOX=666366.7506152338%2C5806932.620463867%2C669056.3504150385%2C5809622.220263671
Anyone has an idea what is happening? We are using PHP 7.1.7 on a Microsoft Server Machine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
