0

We are using a Twisted HTTP server https://twistedmatrix.com/documents/15.0.0/web/howto/using-twistedweb.html and we are experiencing a strange behavior.

This HTTP server serves a static file and in some cases it may returns a 403 to one person (tested in the office) while the rest of the team can download the file without any problem.

If the person receiving a 403 runs a curl the curl works fine, it looks like is something browser specific but my question is can a HTTP server error be cached for a specific request?

After a while the static file can be download fine by the user experiencing a 403.

Also how a 403 (forbidden error) can just affect to just a single request and not to everybody? note there is not any kind of authentication.

Edit: As far as I have tested, looks like the problem just appears in Google Chrome, with Firefox or curl it gets rendered fine although Chrome keeps giving me a 403. That browser is caching somehow the petition and if I try with incognito mode it works fine.

  • Normally you would record a reason as to why a request is denied in an (error) log. If no logging was enabled, now would be the right moment to do so, or maybe you need to increase the debug level – HBruijn Nov 14 '16 at 11:30
  • As far as I have tested, looks like the problem just appears in Google Chrome, with Firefox or curl it gets rendered fine although Chrome keeps giving me a 403. That browser is caching somehow the petition and if I try with incognito mode it works fine. – lapinkoira Nov 14 '16 at 11:45
  • 1
    HTTP errors are not cacheable by default but the web server can always send a Cache-Control header to override this. Of course, doing so is a terrible idea. – Michael Hampton Nov 14 '16 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.