You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide an option on how in OGROAPIFDataset::Download, in conditional block if (psResult->pszErrBuf != nullptr) (currently line 434 ff) the error is generated. There is an assumption made that psResult->pabyData contains the error-text which isn't true in all cases and depends on the server and the type of error which occured in CPLHTTPFetchEx . It would be safer to prefer content of psResult->pszErrBuf instead of psResult->pabyData.
Additional context
On some computer I have no debugging-access to, the following occured:
While processing the OAPIF-Download within CPLHTTPFetchEx (gdal/port/cpl_http.cpp) and using curl, an error "Send failure: Connection was aborted." occured, but the download-result seems to be completely fetched. So psResult->pabyData contains the regular GeoJson-response from the server, while psResult->pszErrBuf contains the error-text ("Send failure: Connection was aborted."). In OGROAPIFDataset::Download in the conditional block if (psResult->pszErrBuf != nullptr), an error is generated containing the whole OGC Feature-API GeoJson as error-text!
The text was updated successfully, but these errors were encountered:
@hebersgit Can you point to this server? But at first sight, I don't see anything wrong in the current implementation of the OAPIF driver. The pabyData could very well be corrupted if pszErrBuf is not null. This looks like a server issue, not a client one
Hi Even, thank you for inspecting this request. I'm sorry, but this server can't be accessed from outside at the moment. We use geoserver with an own API-gateway before it. I fully agree to you, that this is a problem with the server or the connection to it. Additionally, the problem occurs only occasionally.
What I mean is the following: In OGROAPIFDataset::Download, if psResult->pszErrBuf != nullptr, one can't rely on the fact that psResult->pabyData contains an error-message. If one handles the received errors (if GetFeature() returns null e.g.) by inspecting the last error message, the information on the error is lost because psResult->pszErrBuf isn't used. Therefore, I would propose to change ogroapifdriver.cpp, lines 435-437 to always use psResult->pszErrBuf and never psResult->pabyData (or at least a concatenation of psResult->pszErrBuf and psResult->pabyData).
Feature description
Provide an option on how in
OGROAPIFDataset::Download
, in conditional blockif (psResult->pszErrBuf != nullptr)
(currently line 434 ff) the error is generated. There is an assumption made thatpsResult->pabyData
contains the error-text which isn't true in all cases and depends on the server and the type of error which occured inCPLHTTPFetchEx
. It would be safer to prefer content ofpsResult->pszErrBuf
instead ofpsResult->pabyData
.Additional context
On some computer I have no debugging-access to, the following occured:
While processing the OAPIF-Download within
CPLHTTPFetchEx
(gdal/port/cpl_http.cpp) and using curl, an error "Send failure: Connection was aborted." occured, but the download-result seems to be completely fetched. SopsResult->pabyData
contains the regular GeoJson-response from the server, whilepsResult->pszErrBuf
contains the error-text ("Send failure: Connection was aborted."). InOGROAPIFDataset::Download
in the conditional blockif (psResult->pszErrBuf != nullptr)
, an error is generated containing the whole OGC Feature-API GeoJson as error-text!The text was updated successfully, but these errors were encountered: