phonegap / connect-phonegap

Stream a PhoneGap app to any device.
Apache License 2.0
61 stars 63 forks source link

Fixes #191: proxying to invalid url blows things up #195

Closed filmaj closed 7 years ago

filmaj commented 7 years ago

Expanded tests for proxy middleware using rewire. Fixed error object variable references in error flow. Fixed proxy middleware response handling for connection errors, which include string-based error codes, which, if passed to res.end, blow things up. Be more defensive in the error case to ensure we pass an integer in the proper http status code range.

Please review / FYI @timkim @surajpindoria

codecov[bot] commented 7 years ago

Codecov Report

Merging #195 into master will increase coverage by 1.77%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
+ Coverage   87.33%   89.11%   +1.77%     
==========================================
  Files          24       24              
  Lines         450      450              
  Branches       84       84              
==========================================
+ Hits          393      401       +8     
+ Misses         57       49       -8
Impacted Files Coverage Δ
lib/middleware/proxy.js 86.66% <100%> (+53.33%) :arrow_up:

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 7dd29f0...0e2ae05. Read the comment docs.