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

Request without HTTP version specified causes panic #468

Closed
apicht opened this issue Jun 20, 2017 · 3 comments
Closed

Request without HTTP version specified causes panic #468

apicht opened this issue Jun 20, 2017 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@apicht
Copy link

apicht commented Jun 20, 2017

test.gor

<U+1F435><U+1F648><U+1F649>
1 7aa2efe0a43e21475545dc7a97a98dc3ce9a5c5d 1497922705037974000
GET /health_check.php

gor output:

2017/06/20 21:11:20 [HTTPClient] Failed to send request:  GET /health_check.php


2017/06/20 21:11:20 [HTTPClient] Response:  
2017/06/20 21:11:20 PANIC: pkg: runtime error: slice bounds out of range goroutine 18342 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x80
main.(*HTTPClient).Send.func1(0xc822e45c58, 0xc822e45c70)
        /go/src/github.com/buger/gor/http_client.go:147 +0x52d
panic(0xa56e00, 0xc820010090)
        /usr/local/go/src/runtime/panic.go:443 +0x4e9
github.com/buger/gor/proto.Path(0xc822b60e7f, 0x19, 0x19, 0x0, 0x0, 0x0)
        /go/src/github.com/buger/gor/proto/proto.go:348 +0xf8
github.com/buger/gor/proto.SetHost(0xc822b60e7f, 0x19, 0x19, 0xc822e45870, 0x20, 0x20, 0xc822e45850, 0x18, 0x18, 0x0, ...)
        /go/src/github.com/buger/gor/proto/proto.go:423 +0x67
main.(*HTTPClient).Send(0xc821c80080, 0xc822b60e7f, 0x19, 0x19, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/buger/gor/http_client.go:166 +0x368
main.(*HTTPOutput).sendRequest(0xc82000a550, 0xc821c80080, 0xc822b60e40, 0x58, 0x58)
        /go/src/github.com/buger/gor/output_http.go:205 +0x2b6
main.(*HTTPOutput).startWorker(0xc82000a550)
        /go/src/github.com/buger/gor/output_http.go:125 +0x1c7
created by main.(*HTTPOutput).workerMaster
        /go/src/github.com/buger/gor/output_http.go:99 +0x85
@buger buger added the bug Something isn't working label Jun 21, 2017
@buger
Copy link
Owner

buger commented Jun 21, 2017

Well, while I agree that this is sort of an issue, but none of current client can generate such payload :)

@apicht
Copy link
Author

apicht commented Jun 21, 2017

Seems that F5 load balancers use HTTP 0.9 by default.
https://support.f5.com/csp/article/K2167

I can request that our network team update the health checks to use HTTP/1.0, which would eliminate this problem going forward for our particular environment.

@buger buger added this to the 0.16.1 milestone Jun 23, 2017
@buger
Copy link
Owner

buger commented Jun 27, 2017

Should be fixed in 0.16.1

@buger buger closed this as completed Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants