Skip to content

added check to prevent HasContent() to panic after the reader is closed#272

Merged
fredbi merged 1 commit intogo-openapi:masterfrom
fredbi:fix/268-panic
Dec 8, 2023
Merged

added check to prevent HasContent() to panic after the reader is closed#272
fredbi merged 1 commit intogo-openapi:masterfrom
fredbi:fix/268-panic

Conversation

@fredbi
Copy link
Member

@fredbi fredbi commented Dec 7, 2023

Also avoids panic in 2 cases:

@fredbi fredbi changed the title added check to prevent HasContent() to panic after the reader is added check to prevent HasContent() to panic after the reader is closed Dec 7, 2023
@fredbi fredbi requested review from casualjim and youyuanwu December 7, 2023 16:04
closed

* fixes go-openapi#268

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@codecov
Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (337c930) 80.28% compared to head (cf1046e) 80.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #272      +/-   ##
==========================================
+ Coverage   80.28%   80.41%   +0.12%     
==========================================
  Files          44       44              
  Lines        3353     3359       +6     
==========================================
+ Hits         2692     2701       +9     
+ Misses        546      544       -2     
+ Partials      115      114       -1     
Flag Coverage Δ
oldstable 80.41% <100.00%> (+0.12%) ⬆️
stable 80.41% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fredbi fredbi merged commit 1af6e90 into go-openapi:master Dec 8, 2023
@fredbi fredbi deleted the fix/268-panic branch December 8, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic on runtime@v0.26.0/request.go:99

3 participants