Feature request #3457

Connect to WMS service should provide STOP/Cancel button

Added by marisn - almost 9 years ago. Updated over 2 years ago.

Assignee:Marco Hugentobler
Category:Web Services clients/WMS
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:13517


When I choose not working WMS server from connections list and click "Connect" button, QGIS just hangs till socket times out.
It would be better to provide Stop/Cancel request button (ESC key) to stop current request and return to previous state.


#1 Updated by Giovanni Manghi about 8 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#2 Updated by Giovanni Manghi almost 8 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#3 Updated by Pirmin Kalberer over 7 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#4 Updated by Sandro Santilli almost 7 years ago

  • Pull Request or Patch supplied set to No
  • Operating System deleted (Gentoo)

+1, I've just hit this one. Qgis enters what looks like an infinite loop here, actually (unless the timeout is really really long). The log continuosly show these lines:

Debug: src/providers/wms/qgswmsprovider.cpp: 1445: (capabilitiesReplyFinished) entering.
Debug: src/providers/wms/qgswmsprovider.cpp: 1448: (capabilitiesReplyFinished) reply ok
Debug: src/providers/wms/qgswmsprovider.cpp: 1460: (capabilitiesReplyFinished) redirected getcapabilities: http://imsortho.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?SERVICE=WMS&REQUEST=GetCapabilities
Debug: src/core/qgsnetworkaccessmanager.cpp: 65: (queryProxy) using user proxy for http://imsortho.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?SERVICE=WMS&REQUEST=GetCapabilities

CPU is 100% busy with that, no way to interrupt.
Seems to be done by background query because GUI refreshes just fine.

#5 Updated by Sandro Santilli almost 7 years ago

For the record, the url returns a 301 Moved Permanently, but points to self. So it's really the server exposing a loop.
For comparison, wget(1) gives up after the 20th redirect. QGis could do something similar (need another ticket?)

#6 Updated by Sandro Santilli almost 7 years ago

Final report: qgis eventually timed out (wow, it took a long time).
Log contains:

Debug: src/core/qgsmessagelog.cpp: 45: (logMessage) 2013-03-08T17:24:41 Network1 Network request http://imsortho.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?SERVICE=WMS&REQUEST=GetCapabilities timed out
Debug: src/providers/wms/qgswmsprovider.cpp: 1508: (capabilitiesReplyProgress) 0 of 0 bytes of capabilities downloaded.
Debug: src/providers/wms/qgswmsprovider.cpp: 1445: (capabilitiesReplyFinished) entering.
Debug: src/core/qgsmessagelog.cpp: 45: (logMessage) 2013-03-08T17:24:41 WMS1 Download of capabilities failed: Operation canceled
Debug: src/providers/wms/qgswmsprovider.cpp: 1372: (retrieveServerCapabilities) response is empty
Debug: src/providers/wms/qgswmsprovider.cpp: 4315: (lastError) returning 'Download of capabilities failed: Operation canceled'.

#7 Updated by Sandro Santilli almost 7 years ago

I've added a protection for simple redirect loops with 6795aef03cf4f9194abb1fabf90d998dd491aa33
Could not test against valid (non-looping) redirects as I don't know of any such service.

#8 Updated by Giovanni Manghi over 2 years ago

  • Easy fix? set to No

Also available in: Atom PDF