| 4167 | } |
| 4168 | |
| 4169 | int msReturnURL(mapservObj* ms, char* url, int mode) |
| 4170 | { |
| 4171 | char *tmpurl; |
| 4172 | |
| 4173 | if(url == NULL) { |
| 4174 | msSetError(MS_WEBERR, "Empty URL.", "msReturnURL()"); |
| 4175 | return MS_FAILURE; |
| 4176 | } |
| 4177 | |
| 4178 | tmpurl = processLine(ms, url, NULL, mode); /* URL templates can't handle multi-line tags, hence the NULL file pointer */ |
| 4179 | |
| 4180 | if(!tmpurl) |
| 4181 | return MS_FAILURE; |
| 4182 | |
| 4183 | msRedirect(tmpurl); |
| 4184 | free(tmpurl); |
| 4185 | |
| 4186 | return MS_SUCCESS; |
| 4187 | } |
| 4188 | |
| 4189 | /* |
| 4190 | ** Legacy query template parsing where you use headers, footers and such... |
no test coverage detected