tickets: 6213
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6213 | 2007-12-15 02:50:07 | 2011-04-20 14:41:48 | 2022-03-06 03:36:31.834935 | Accepted | closed | contrib.flatpages | Bug | Normal | dev | fixed | PREPEND_WWW and APPEND_SLASH settings don't work with flatpages middleware | The {{{PREPEND_WWW}}} and {{{APPEND_SLASH}}} settings don't force a redirect when {{{FlatpageFallbackMiddleware}}} is being used. This is because a redirect only happens if the target URL can be resolved using {{{urlresolvers.resolve()}}} in the code. This behaviour has occurred since the change in [6852]. If the target URL cannot be resolved immediately using {{{urlresolvers.resolve()}}}, perhaps we should check in {{{process_response()}}} to make absolutely sure the response status code will be 404? If some intermediate middleware, e.g. {{{FlatpageFallbackMiddleware}}} has returned a successful response code, we can then issue a redirect as per the old behaviour. | orthagonal | esaj | APPEND_SLASH PREPEND_WWW flatpages easy-pickings | 0 | 1 | 1 | 0 | 0 | 0 |