Ticket #1743 (closed enhancement: wontfix)
Const correctness in cpl_http module
| Reported by: | mloskot | Owned by: | mloskot |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | default | Version: | svn-trunk |
| Severity: | normal | Keywords: | const-correctness http |
| Cc: |
Description
AFAIR, the cpl_http.h|cpp module is quite new and not widely used across GDAL components. I'd suggest to review it and fix const-correctness of input parameters. For instance, function CPLHTTPFetch takes char** papszOptions but this parameters is (conceptually) read-only. So, my suggestion is to change the prototype of CPLHTTPFetch to:
CPLHTTPResult CPLHTTPFetch(const char* pszUrl, const char* const* papszOptions);
Here is an example of potential problems related to the issue reported in this ticket.
Change History
Note: See
TracTickets for help on using
tickets.
