Skip to content

nginx worker restart when get the value of header X-Forwarded-For #70

@xfeep

Description

@xfeep

It 's a bug.

The code in the method initMemIndex ( at NginxClojureRT.java )

KNOWN_REQ_HEADERS.put("X-Forwarded-For",  
      safeBuildKnownTableEltHeaderHolder("X-Forwarded-For",
                  NGX_HTTP_CLOJURE_HEADERSI_X_FORWARDED_FOR_OFFSET,
                  NGX_HTTP_CLOJURE_HEADERSI_HEADERS_OFFSET));

SHOULD BE changed to

KNOWN_REQ_HEADERS.put("X-Forwarded-For", 
new ArrayHeaderHolder("X-Forwarded-For",
          NGX_HTTP_CLOJURE_HEADERSI_X_FORWARDED_FOR_OFFSET,
          NGX_HTTP_CLOJURE_HEADERSI_HEADERS_OFFSET));

Then recompile the java source by lein

#Please check the lein version lein version, it should be at least 2.0.0.
$ cd nginx-clojure
$ lein jar

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions