Skip to content

Commit

Permalink
check for content length
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalguptaofficial committed Apr 13, 2020
1 parent e153180 commit 60ccdb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handlers/post_handler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module Shivneri
contentType = parse_content_type(contentType)
if (contentType == MIME_TYPE["form_multi_part"])
self.parse_multi_part_data
else
elsif request.content_length.as(UInt64) > 0
case contentType
when MIME_TYPE["form_url_encoded"]
HTTP::Params.parse(request.body.as(IO).gets_to_end).each do |key, val|
Expand Down

0 comments on commit 60ccdb4

Please sign in to comment.