rexyai / RestRserve

R web API framework for building high-performance microservices and app backends
https://restrserve.org
275 stars 32 forks source link

Rework boundary parsing for the multipart body (fix #137) #139

Closed artemklevtsov closed 4 years ago

artemklevtsov commented 4 years ago

Summary:

lintr-bot commented 4 years ago

inst/tinytest/test-parse-multipart.R:80:1: style: Trailing blank lines are superfluous.

​
^
lintr-bot commented 4 years ago

inst/tinytest/test-parse-multipart.R:80:1: style: Trailing blank lines are superfluous.

​
^
codecov[bot] commented 4 years ago

Codecov Report

Merging #139 into dev will increase coverage by 2.35%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #139      +/-   ##
==========================================
+ Coverage   92.54%   94.90%   +2.35%     
==========================================
  Files          27       27              
  Lines        1315     1275      -40     
==========================================
- Hits         1217     1210       -7     
+ Misses         98       65      -33     
Impacted Files Coverage Δ
R/BackendRserve.R 94.62% <100.00%> (+23.30%) :arrow_up:
src/format_cookies.cpp 100.00% <100.00%> (ø)
src/format_headers.cpp 100.00% <100.00%> (ø)
src/parse_cookies.cpp 100.00% <100.00%> (ø)
src/parse_headers.cpp 100.00% <100.00%> (ø)
src/parse_multipart.cpp 97.61% <100.00%> (-1.17%) :arrow_down:
src/url_decode.cpp 95.65% <100.00%> (ø)
src/url_encode.cpp 100.00% <100.00%> (ø)
src/nonstd/string_view.hpp 96.00% <0.00%> (-0.78%) :arrow_down:
R/Request.R 89.56% <0.00%> (+1.73%) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 68c6cf7...f4d5243. Read the comment docs.

dselivanov commented 4 years ago

Since we have issue with upper case boundary it makes sense to add test where boundary has symbols in upper case. For example gc0p4Jq0M2Yt08jU534c0p as used in rfc1341.

lintr-bot commented 4 years ago

inst/tinytest/setup.R:24:7: style: Use =, not <-, for assignment.

​  sym <- c(0:9, letters, LETTERS)
      ^