Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske authored and thibaultcha committed Jul 20, 2016
1 parent 0b51f89 commit c6545d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kong/plugins/request-size-limiting/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ local BasePlugin = require "kong.plugins.base_plugin"
local responses = require "kong.tools.responses"
local strip = require("pl.stringx").strip

local MEGABYTE = 10^6
local MB = 2^20

local RequestSizeLimitingHandler = BasePlugin:extend()

RequestSizeLimitingHandler.PRIORITY = 950

local function check_size(length, allowed_size, headers)
local allowed_bytes_size = allowed_size * MEGABYTE
local allowed_bytes_size = allowed_size * MB
if length > allowed_bytes_size then
if headers.expect and strip(headers.expect:lower()) == "100-continue" then
return responses.send(417, "Request size limit exceeded")
Expand Down
1 change: 0 additions & 1 deletion spec/03-plugins/request-transformer/02-api_spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local helpers = require "spec.helpers"
local cjson = require "cjson"

describe("Plugin: request-transformer (API)", function()
local admin_client
Expand Down
1 change: 0 additions & 1 deletion spec/03-plugins/response-transformer/03-api_spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local helpers = require "spec.helpers"
local cjson = require "cjson"

describe("Plugin: response-transformer (API)", function()
local admin_client
Expand Down

0 comments on commit c6545d2

Please sign in to comment.