Skip to content

nginx 1.4.7 hangs on requests with eval #16

@sjanecki

Description

@sjanecki

Nginx is compiled only with this module.
I've downloaded module from:
http://www.grid.net.ru/nginx/download/nginx_eval_module-1.0.1.tar.gz
And it hangs on request.

worker_processes  1;
error_log  logs/error.log  info;

events {
    use epoll;
    worker_connections 1024;
    multi_accept on;
}

http {
    include       mime.types;
    default_type  text/plain;
    sendfile        on;
    keepalive_timeout  5;

    server {
        listen 80;
        server_name test.local;

        location / {

            eval $res {
                proxy_set_header Host $http_host;
                proxy_pass http://127.0.0.1:8081/check;
            }

            if ($res = 'spam') {
                return 401;
            }
            if ($res != 'spam') {
                return 404;
            }
        }

    }

}

I can see communication with my upstream server:

127.000.000.001.42387-127.000.000.001.08081: GET /check HTTP/1.0
Host: test.local
Connection: close
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Cache-Control: max-age=0


127.000.000.001.08081-127.000.000.001.42387: HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 11
Date: Sun, 30 Mar 2014 11:37:29 GMT
Connection: close

exampletext

Request and response are OK but after that nothing happend. Request hangs...

From port 80 perspective I have:

010.000.002.002.54814-010.000.002.015.00080: GET / HTTP/1.1
Host: test.local
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cache-Control: max-age=0

And after couple of seconds connection is closed.

Help me. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions