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

[🐛 BUG]: Unable to POST relatively chunky POST #1765

Closed
1 task done
FluffyDiscord opened this issue Nov 2, 2023 · 0 comments · Fixed by roadrunner-server/http#189
Closed
1 task done

[🐛 BUG]: Unable to POST relatively chunky POST #1765

FluffyDiscord opened this issue Nov 2, 2023 · 0 comments · Fixed by roadrunner-server/http#189
Assignees
Labels
B-bug Bug: bug, exception
Milestone

Comments

@FluffyDiscord
Copy link

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

I am trying to post relatively big payload and RR server is failing. I am not sure if this is issue on my end (somehow sending the payload wrong) or the RR server (unable to parse it)

Version (rr --version)

rr version 2023.3.3 (build time: 2023-10-26T18:43:18+0000, go1.21.3), OS: linux, arch: amd64

How to reproduce the issue?

.rr.yaml

version: "3"

server:
    command: "php public/index.php"
    env:
        -   APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime

kv:
    memory:
        driver: memory
        config: { }

rpc:
    listen: tcp://127.0.0.1:6001

http:
    address: 0.0.0.0:8080
    middleware: [ "sendfile", "gzip", "static" ]
    pool:
        debug: true
    uploads:
        forbid: [ ".php", ".exe", ".bat" ]
    static:
        dir: "public"
        forbid: [ ".php", ".htaccess" ]

logs:
    mode: development
    channels:
        http:
            level: debug # Log all http requests, set to info to disable
        server:
            level: debug # Everything written to worker stderr is logged
            mode: raw
        metrics:
            level: debug

Example curl with the payload that is failing:
example_curl.txt

Relevant log output

internal server error	{"message": "http_plugin: 2023/11/02 10:59:44 http: panic serving 192.168.160.1:33040: interface conversion: interface {} is string, not handler.dataTree\ngoroutine 16 [running]:\nnet/http.(*conn).serve.func1()\n\tnet/http/server.go:1868 +0xb9\npanic({0x1bf8740?, 0xc000dbcb40?})\n\truntime/panic.go:920 +0x270\ngithub.com/roadrunner-server/http/v4/handler.dataTree.mount(0x1c832a0?, {0xc000b151c0?, 0x2, 0x4}, {0xc0018884f0?, 0x1, 0x1})\n\tgithub.com/roadrunner-server/http/[email protected]/handler/parse.go:109 +0x306\ngithub.com/roadrunner-server/http/v4/handler.dataTree.mount(0x1c832a0?, {0xc000b151b0?, 0x3, 0x5}, {0xc0018884f0?, 0x1, 0x1})\n\tgithub.com/roadrunner-server/http/[email protected]/handler/parse.go:109 +0x2ce\ngithub.com/roadrunner-server/http/v4/handler.dataTree.mount(0x1c832a0?, {0xc000b151a0?, 0x4, 0x6}, {0xc0018884f0?, 0x1, 0x1})\n\tgithub.com/roadrunner-server/http/[email protected]/handler/parse.go:109 +0x2ce\ngithub.com/roadrunner-server/http/v4/handler.dataTree.mount(0x1c832a0?, {0xc000b15190?, 0x5, 0x7}, {0xc0018884f0?, 0x1, 0x1})\n\tgithub.com/roadrunner-server/http/[email protected]/handler/parse.go:109 +0x2ce\ngithub.com/roadrunner-server/http/v4/handler.dataTree.mount(0xc000050b80?, {0xc000b15180?, 0x6, 0x8}, {0xc0018884f0?, 0x1, 0x1})\n\tgithub.com/roadrunner-server/http/[email protected]/handler/parse.go:109 +0x2ce\ngithub.com/roadrunner-server/http/v4/handler.dataTree.push(0xc00093a4c8?, {0xc001898d00, 0x24}, {0xc0018884f0, 0x1, 0x1})\n\tgithub.com/roadrunner-server/http/[email protected]/handler/parse.go:50 +0x31d\ngithub.com/roadrunner-server/http/v4/handler.parseMultipartData(0xc0001bc800)\n\tgithub.com/roadrunner-server/http/[email protected]/handler/parse.go:36 +0xbc\ngithub.com/roadrunner-server/http/v4/handler.request(0xc0001bc800, 0xc00081cea0, 0x0?, 0x0?, 0x0)\n\tgithub.com/roadrunner-server/http/[email protected]/handler/request.go:101 +0x472\ngithub.com/roadrunner-server/http/v4/handler.(*Handler).ServeHTTP(0xc000c3c960, {0x242b180, 0xc0001bf5c0}, 0x1df2dc0?)\n\tgithub.com/roadrunner-server/http/[email protected]/handler/handler.go:114 +0xe8\ngithub.com/roadrunner-server/http/v4.(*Plugin).ServeHTTP(0xc0000eaea0, {0x242b180, 0xc0001bf5c0}, 0xc0001bc800)\n\tgithub.com/roadrunner-server/http/[email protected]/plugin.go:208 +0x465\ngithub.com/roadrunner-server/http/v4.(*Plugin).applyBundledMiddleware.MaxRequestSize.func1({0x242b180, 0xc0001bf5c0}, 0xffffffffffffffff?)\n\tgithub.com/roadrunner-server/http/[email protected]/middleware/maxRequest.go:15 +0xb6\nnet/http.HandlerFunc.ServeHTTP(0xc0001bc600?, {0x242b180?, 0xc0001bf5c0?}, 0xc001037028?)\n\tnet/http/server.go:2136 +0x29\ngithub.com/roadrunner-server/http/v4.(*Plugin).applyBundledMiddleware.NewLogMiddleware.(*lm).Log.func3({0x242b2a0, 0xc00083e600}, 0x1ba7f40?)\n\tgithub.com/roadrunner-server/http/[email protected]/middleware/log.go:125 +0x17a\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x242b2a0?, 0xc00083e600?}, 0x0?)\n\tnet/http/server.go:2136 +0x29\ngithub.com/roadrunner-server/send/v4.(*Plugin).Middleware.func1({0x242b870, 0xc000c1c0a0}, 0xc0001bc600)\n\tgithub.com/roadrunner-server/send/[email protected]/plugin.go:77 +0x53a\nnet/http.HandlerFunc.ServeHTTP(0xc00091b580?, {0x242b870?, 0xc000c1c0a0?}, 0xa0?)\n\tnet/http/server.go:2136 +0x29\ngithub.com/roadrunner-server/gzip/v4.(*Plugin).Middleware.func1({0x242b870, 0xc000c1c0a0}, 0xc0001bc600)\n\tgithub.com/roadrunner-server/gzip/[email protected]/plugin.go:43 +0x472\nnet/http.HandlerFunc.ServeHTTP(0x1bfb0c0?, {0x242b870?, 0xc000c1c0a0?}, 0x1edc0cb?)\n\tnet/http/server.go:2136 +0x29\ngithub.com/klauspost/compress/gzhttp.NewWrapper.func1.1({0x242a190, 0xc0009280e0}, 0x1ba7f40?)\n\tgithub.com/klauspost/[email protected]/gzhttp/compress.go:486 +0x28b\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x242a190?, 0xc0009280e0?}, 0x1?)\n\tnet/http/server.go:2136 +0x29\ngithub.com/roadrunner-server/static/v4.(*Plugin).Middleware.func1({0x242a190, 0xc0009280e0}, 0xc0001bc600)\n\tgithub.com/roadrunner-server/static/[email protected]/plugin.go:149 +0x59e\nnet/http.HandlerFunc.ServeHTTP(0x2423910?, {0x242a190?, 0xc0009280e0?}, 0x6?)\n\tnet/http/server.go:2136 +0x29\nnet/http.serverHandler.ServeHTTP(...)\n\tnet/http/server.go:2938\nnet/http.(*conn).serve(0xc0000ead80, {0x24325e0, 0xc000c1b080})\n\tnet/http/server.go:2009 +0x65d\ncreated by net/http.(*Server).Serve in goroutine 73\n\tnet/http/server.go:3086 +0x5cb\n"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants