| 186 |
* Go ahead and try to grok the 1st arg, in case it is a |
* Go ahead and try to grok the 1st arg, in case it is a |
| 187 |
* Redirect status. Now if we have 3 args, we expect that |
* Redirect status. Now if we have 3 args, we expect that |
| 188 |
* we were able to understand that 1st argument (it's something |
* we were able to understand that 1st argument (it's something |
| 189 |
* we expected, so if not, then we bail. We also check that we |
* we expected, so if not, then we bail |
|
* don't have a 3rd argument with GONE or with numeric codes |
|
|
* outside of 300-399; if we do, then that's an error. |
|
| 190 |
*/ |
*/ |
| 191 |
if (!strcasecmp(arg1, "permanent")) |
if (!strcasecmp(arg1, "permanent")) |
| 192 |
status = HTTP_MOVED_PERMANENTLY; |
status = HTTP_MOVED_PERMANENTLY; |
| 204 |
if (arg3 && !grokarg1) |
if (arg3 && !grokarg1) |
| 205 |
return "Redirect: invalid first argument (of three)"; |
return "Redirect: invalid first argument (of three)"; |
| 206 |
|
|
|
if (arg3 && status == HTTP_GONE) |
|
|
return "Redirect: third argument not expected"; |
|
|
|
|
|
if (arg3 && (apr_isdigit(*arg1) && (status < 300 || status > 399))) |
|
|
return "Redirect: third argument not expected"; |
|
|
|
|
| 207 |
/* |
/* |
| 208 |
* if we don't have the 3rd arg and we didn't understand the 1st |
* if we don't have the 3rd arg and we didn't understand the 1st |
| 209 |
* one, then assume URL-path URL. This also handles case, eg, GONE |
* one, then assume URL-path URL. This also handles case, eg, GONE |