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: panic: http: invalid Read on closed Body #121

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

dunglas
Copy link
Owner

@dunglas dunglas commented Dec 7, 2022

Because of golang/go#15527, go_read_post could panic:

panic: http: invalid Read on closed Body                                                                                               
goroutine 52 [running, locked to thread]:                                                                                              
github.com/dunglas/frankenphp.go_read_post(0x4000076ad8?, 0x407d80?, 0x4000)                                                           
    /go/src/app/frankenphp.go:562 +0x134                                                                                               
github.com/dunglas/frankenphp._Cfunc_frankenphp_request_shutdown()                                                                     
    _cgo_gotypes.go:818 +0x38                                                                                                          
github.com/dunglas/frankenphp.go_execute_script(0x4000076d01?)                                                                         
    /go/src/app/frankenphp.go:443 +0x1e4     

This patch logs an error instead of panicking.

Reported privately by @jfcoz.

@dunglas dunglas merged commit 2937aa8 into main Dec 7, 2022
@dunglas dunglas deleted the fix/go_read_post-panic branch December 7, 2022 13:40
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.

None yet

1 participant