WebFaction
Community site: login faq

I am a user on web377 (but not sure whether the following only occurs on web377 or not).

Basically I am testing my own (restful) app's user authentication feature, by first sending an unauthenticated request and expecting an http 403 response (and it did!), and then sending an (HTTP Basic Auth) authenticated request and expecting an http 200 response but this time I got a cached http 403 response instead.

I can also confirm that, in the latter situation, there is no log appear in ~/logs/frontend/access_myapp.log, further justifying the suspect that system-wide nginx is the culprit.

I know a simple work around on client-side can be appending a so-called cache-buster timestamp into request url, but I wanna know whether this is considered a wrong configuration of server-side. Thanks in advance!

Excerpt of my client-side log:

send: 'GET /v1/rest/generic.json/auth_user/106 HTTP/1.1\r\nHost: sandbox.example.com\r\nAccept-Encoding: gzip, deflate, compress\r\nAccept: */*\r\nUser-Agent: python-requests/1.2.3 CPython/2.7.3 Windows/XP\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'
header: Server: nginx
header: Content-Type: text/html; charset=UTF-8
header: Content-Length: 14
header: Date: Wed, 24 Jul 2013 08:21:17 GMT
header: Connection: keep-alive

send: 'GET /v1/rest/generic.json/auth_user/106 HTTP/1.1\r\nHost: sandbox.example.com\r\nAuthorization: Basic dGVzdGVyXzQzOTppbml0aWFs\r\nAccept-Encoding: gzip, deflate, compress\r\nAccept: */*\r\nUser-Agent: python-requests/1.2.3 CPython/2.7.3 Windows/XP\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'
header: Server: nginx
header: Content-Type: text/html; charset=UTF-8
header: Content-Length: 14
header: Age: 5
header: Date: Wed, 24 Jul 2013 08:21:17 GMT
header: Connection: keep-alive

asked 24 Jul '13, 03:46

iceberg
526
accept rate: 0%

Neither our nginx or our apache servers do any caching. That is left up to your applications.

(24 Jul '13, 11:50) bmeyer71 ♦♦

Given the fact that the second request never shows up in ~/logs/frontend/access_myapp.log, I think my webfaction application does not even have a chance to make an impact. And I also make some research, which suggesting the client-side tool I am using, which is requests package for Python, does not provide cache either. So perhaps the only logical conclusion is some cache exists between me and WF server, probably a cache from my ISP. Can't do anything about that. :-/ Thanks anyway.

(24 Jul '13, 23:45) iceberg
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×28
×12

question asked: 24 Jul '13, 03:46

question was seen: 2,740 times

last updated: 24 Jul '13, 23:45

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM