Closed sjnam closed 8 years ago
Maybe we can just make the max_line_size the (optional) second argument to the new
method?
Is this OK?
@sjnam Will you please add some test cases for this feature to the existing test suite? Otherwise it looks good to me :) Thanks a lot!
I added test case "TEST 10" which is almost identical to "TEST 2" except the following line
local form = upload:new(5, 1024) -- max_line_size = 1024
so this test case has not an error. TEST 2 has an "fail to read: line too long" error.
@sjnam That's cool. Thank you. I'll look into this PR soon.
@agentzh Happy New Year! :-) I added one more blank line.
I'll check this out soon, thank you. And happy new year :)
@sjnam Sorry for the delay on my side. Just merged your changes to git master :) Thanks a lot!
local form, err = upload:new() if not form then ngx.log(ngx.ERR, "failed to new upload: ", err) ngx.exit(500) end
local max_line_size = 1024 form:set_line_size(max_line_size)