Changes between Version 10 and Version 11 of MapGuideRfc118
- Timestamp:
- 07/12/11 22:59:23 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc118
v10 v11 170 170 }}} 171 171 It uses '''{{{127.0.0.1}}}''' explicitly to connect to the Web Extension. There reason why it was implemented this way is like below: 172 [[BR]] 172 173 The url is actually a self-referencing URL (the http request is sent and responded by a same host). So the first idea would be just use '''{{{LOCALHOST}}}''' to connect to the Web Extension. But the problem is the php function '''{{{imagecreatefrompng(url)}}}''' will run into error if the the url contains '''{{{LOCALHOST}}}'''. So this solution doesn’t work. 174 [[BR]] 173 175 The second idea would be use '''{{{$_SERVER[“SERVER_NAME”]}}}''' to get the host name at runtime. But it doesn’t work if the Web Extension Server is behind a proxy Http server. In this case '''{{{$_SERVER[“SERVER_NAME”]}}}''' will be the name of proxy server instead of web extension server. And it’s possible that web extension server cannot connect to the proxy server. Then the picture cannot be generated by that url. So this solution also doesn’t work. 176 [[BR]] 174 177 '''{{{127.0.0.1}}}''' is the right solution considering above cases. 178 [[BR]] 175 179 But after IPv6 has been introduced, the solution of '''{{{127.0.0.1}}}''' will not work with IPv6. 180 [[BR]] 176 181 The solution is: don’t use the Http API to generate the map image. Use Web Tier API instead. The API should be one of the 177 182 {{{