- 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.5k
 
handle Body return EOF #1810
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
base: master
Are you sure you want to change the base?
handle Body return EOF #1810
Conversation
handle Body will return EOF when it used in middleware.
          Codecov Report
 @@            Coverage Diff             @@
##           master    #1810      +/-   ##
==========================================
+ Coverage   98.62%   98.62%   +<.01%     
==========================================
  Files          41       41              
  Lines        2113     2115       +2     
==========================================
+ Hits         2084     2086       +2     
  Misses         18       18              
  Partials       11       11
 Continue to review full report at Codecov. 
  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be better if you add a test that cover your changes.
| 
           @disilin  Thank you for this patch, I'm interested in why this is a good idea. Using any  So why would we want to make this one bind method even more different that all the others? As a side note for @thinkerou  @appleboy  I think we should deprecate    | 
    
| 
           I'm also a little concerned the Handler is pretty well documented and discourages us from changing the request. It might not matter now, but I think this would be us clearly breaking that "rule" https://golang.org/pkg/net/http/#Handler  | 
    
| 
           @thinkerou @appleboy please review this MR. I agree @dmarkham : handlers should not modify the provided Request. I have the same confused about it when I invoke bind function with req, the req will be empty buffer object. I think it’s should get fiexed.  | 
    
| 
           @disilin Could you add testcase for this? It good to reviewer to understand your changing and ensure the framework is still stable for gin user. We will thank you.  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| 
           @disilin Please add some unit testing.  | 
    
          
 still need, move to 1.10  | 
    
| 
           move to 1.11  | 
    
handle Body will return EOF when it used in middleware.
master