| 2278 | } |
| 2279 | |
| 2280 | static std::string build_url(PJ_CONTEXT *ctx, const char *name) { |
| 2281 | if (!nfm_is_tilde_slash(name) && !nfm_is_rel_or_absolute_filename(name) && |
| 2282 | !starts_with(name, "http://") && !starts_with(name, "https://")) { |
| 2283 | std::string remote_file(proj_context_get_url_endpoint(ctx)); |
| 2284 | if (!remote_file.empty()) { |
| 2285 | if (remote_file.back() != '/') { |
| 2286 | remote_file += '/'; |
| 2287 | } |
| 2288 | remote_file += name; |
| 2289 | } |
| 2290 | return remote_file; |
| 2291 | } |
| 2292 | return name; |
| 2293 | } |
| 2294 | |
| 2295 | // --------------------------------------------------------------------------- |
| 2296 |
no test coverage detected