Why Http Response Returns 2 Codes

This is a django project, a very simple one indeed, i got a question about the response code of the HTTP header.

I am running it on localhost.

# URL Patterns in the Project folder.

urlpatterns = [
    path('blog/', include(blog.urls)),
]

# URL Patterns in the blog folder.
urlpatterns = [
    path('index/', blog.views.index, name='blog_index'),
    path('about/', blog.views.about, name='blog_about')
]

Everything runs fine but the shell response is:

[21/Aug/2019 21:15:54] "GET /blog/index/ HTTP/1.1" 200 144

The question is about the HTTP Header response 200 144

After playing with urllib a bit i used to think that headers send only 1 response code 200 OK

For some reason django sends 2 codes

200 OK
144 Corresponds with HTTP 404.
# Reference  

1 Answer

144 is not a status code, it's the size of the response.

The error codes reference you found has nothing to do HTTP status codes in general or with your Django project. These are error codes used solely by Twitter API. You finding it in a google search is merely coincidental.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest