Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] allow empty headers on DataFromReader #2121

Merged
merged 2 commits into from
Nov 25, 2019

Conversation

vkd
Copy link
Contributor

@vkd vkd commented Nov 3, 2019

Fixed #2111

Now is possible to call c.DataFromReader without extra headers.

c.DataFromReader(http.StatusOK, 5, gin.MIMEHTML, strings.NewReader("1234\n"), nil)

Thanks: @nikandfor

@codecov
Copy link

codecov bot commented Nov 3, 2019

Codecov Report

Merging #2121 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2121      +/-   ##
==========================================
+ Coverage   98.61%   98.61%   +<.01%     
==========================================
  Files          40       40              
  Lines        2236     2238       +2     
==========================================
+ Hits         2205     2207       +2     
  Misses         16       16              
  Partials       15       15
Impacted Files Coverage Δ
render/reader.go 100% <100%> (ø) ⬆️

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 2ee0e96...e525063. Read the comment docs.

@appleboy appleboy added this to the 1.6 milestone Nov 24, 2019
@appleboy appleboy added the bug label Nov 24, 2019
@thinkerou thinkerou merged commit b52a1a1 into gin-gonic:master Nov 25, 2019
@vkd vkd deleted the fix-headers-data-from-reader branch November 25, 2019 06:43
ThomasObenaus pushed a commit to ThomasObenaus/gin that referenced this pull request Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFromReader with nil extraHeaders crashes
3 participants