Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer exception when body is not present in the request #565

Closed
subnetmarco opened this issue Sep 24, 2015 · 0 comments
Closed

Null pointer exception when body is not present in the request #565

subnetmarco opened this issue Sep 24, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@subnetmarco
Copy link
Member

The following error occurs for requests that don't present a body, like a 100-continue request for multipart-data reqs.

2015/09/23 09:08:29 [error] 3927#0: *10985 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/multipart.lua:42: attempt to index local 'body' (a nil value)
stack traceback:
coroutine 0:
        /usr/local/share/lua/5.1/multipart.lua: in function 'decode'
        /usr/local/share/lua/5.1/multipart.lua:110: in function 'Multipart'
        /usr/local/share/lua/5.1/kong/plugins/keyauth/access.lua:48: in function 'get_key_from_query'
        /usr/local/share/lua/5.1/kong/plugins/keyauth/access.lua:108: in function </usr/local/share/lua/5.1/kong/plugins/keyauth/access.lua:103>
        /usr/local/share/lua/5.1/kong/plugins/keyauth/access.lua:123: in function 'execute'
        /usr/local/share/lua/5.1/kong/plugins/keyauth/handler.lua:12: in function 'access'
        /usr/local/share/lua/5.1/kong.lua:191: in function 'exec_plugins_access'
        access_by_lua(nginx.conf:89):1: in function <access_by_lua(nginx.conf:89):1>, client: xxx.xxx.xxx.xxx, server: _, request: "POST /api/v1/ HTTP/1.1", host: "kong.<Domain>:8000"
2015/09/23 09:08:29 [error] 3927#0: *10985 [lua] responses.lua:61: send_HTTP_INTERNAL_SERVER_ERROR(): An unexpected error occurred, client: xxx.xxx.xxx.xxx, server: _, request: "POST /api/v1/ HTTP/1.1", host: "kong.<Domain>:8000"
@subnetmarco subnetmarco self-assigned this Sep 24, 2015
@subnetmarco subnetmarco added this to the 0.5.0 milestone Sep 24, 2015
subnetmarco added a commit that referenced this issue Sep 24, 2015
xvaara added a commit to xvaara/kong that referenced this issue Oct 3, 2015
* Mashape/master: (23 commits)
  Update README.md
  Update README.md
  Closing Kong#562
  Adding wait time before ratelimiting tests
  Fixing test
  fix(jwt) handle `iss` not being found in jwt credentials
  Update README.md
  docs(update) remove redundancy
  docs(update) fix layout
  fix(test) fix config test after Kong#563
  Update README.md
  Adding missing statement for Kong#571
  perf(analytics) global optimizations
  fix(plugins) make default config for plugins an empty object
  Closes Kong#445
  dbocs(changelog) 0.5.0 changes
  Better content-type check in response-transformer plugin
  Closes Kong#535
  Fixes the root problem at Kong#565
  fix(key-auth) remove support for key in request body
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant