#26504: Warnings logged for page "Not Found" before redirect to 
language-prefixed
page
---------------------------------+--------------------------------------
     Reporter:  cworth-gh        |                    Owner:
         Type:  Bug              |                   Status:  new
    Component:  Error reporting  |                  Version:  master
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Changes (by cworth-gh):

 * needs_docs:   => 0
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Old description:

> I've noticed that I've been getting warnings logged for things like:
>
>     Not Found: /
>
> This results from accessing a path of "/" which is getting redirected by
> LocaleMiddleware to "/en/". So, in fact there is never any actual "page
> not found" happening here, but the code is logging based on a temporary
> 404 exception that the LocaleMiddleware will touch up into a redirect
> response.
>
> I admit that I'm a little OCD when it comes to my log files, and I prefer
> them to be warning-free when nothing wrong is happening.
>
> I've got a commit series all ready to fix this bug, which I'll try to
> attach to this ticket in the appropriate way, (but please let me know if
> I get any of the details wrong).

New description:

 I've noticed that I've been getting warnings logged for things like:

     Not Found: /

 This results from accessing a path of "/" which is getting redirected by
 LocaleMiddleware to "/en/". So, in fact there is never any actual "page
 not found" happening here, but the code is logging based on a temporary
 404 exception that the LocaleMiddleware will touch up into a redirect
 response.

 I admit that I'm a little OCD when it comes to my log files, and I prefer
 them to be warning-free when nothing wrong is happening.

 I've got a commit series all ready to fix this bug, which I'll try to
 attach to this ticket in the appropriate way, (but please let me know if I
 get any of the details wrong).

 The pull request is here:

 https://github.com/django/django/pull/6453

--

--
Ticket URL: <https://code.djangoproject.com/ticket/26504#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.2f857ad8ec0203d6d0e5b97a3608e52b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to