samizdatco/nginx-http-auth-digest

Hanging on request (Ubuntu 11.10 amd64, nginx 1.0.11)

Closed this issue · 4 comments

conf commented

Hello!
I'm trying to use your module on latest Ubuntu 11.10 amd64 with latest nginx nginx-1.0.11, but can't manage it to work properly, it just hangs on request.
It compiles ok, I used (./configure --add-module=../nginx-http-auth-digest --with-debug).
I generated digest file with the following content
conf@laptop /usr/local/nginx $ cat passwd.digest
conf:this is not for you:7c564d82ab2ad4890b7edf1d87b605b6
conf@laptop /usr/local/nginx $
and put it into /usr/local/nginx/

Nginx.conf: http://pastebin.com/JVFeqVPX

But when I go to the protected url in browser or try curl via
conf@laptop /usr/local/nginx/conf $ curl -vvv --digest --user conf http://localhost:8000/private/
Enter host password for user 'conf':

  • About to connect() to localhost port 8000 (#0)
  • Trying 127.0.0.1... connected
  • Connected to localhost (127.0.0.1) port 8000 (#0)
  • Server auth using Digest with user 'conf'

    GET /private/ HTTP/1.1
    User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
    Host: localhost:8000
    Accept: /

It just hangs there.
Error.log: http://pastebin.com/a7VVGGXJ

Could you help me with this problem?
Thanks.

conf commented

Forgot to mention, digest password is 12345.

It looks like the problem was actually due to bad logic in the module initialization. if auth_digest_shm_size wasn't specified in the config file, the size would correctly be set to a default, but an internal cleanup structure wasn't being allocated. this led to the deadlock you were seeing.

should now be fixed.

conf commented

It seems the same with 1.0.10 too.
Thanks for looking into this.

conf commented

Thanks! That really has fixed the problem.