Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Support option to specify buffer size #2
Comments
|
I would like to work on this but you talk about OOM. Wouldn't that still happen if you keep storing the streamed data in the cache? Or do you mean streaming directly to the "pasting device"? What would a perfect implementation be? |
|
@thealamu Sorry for the confusion. It doesn't mean streaming directly to the "pasting device". It means to stream it to the pbgopy server. However, pbgopy supports end-to-end encryption, so I'm beginning to feel it's not appropriate.
|
|
Let's change it to fail if you try to copy more data than the specified size with the |
|
Okay, please assign to me. |
|
@thealamu Yes, I'll be happy with that. Your help is essential. |


Currently, it uses
ReadAll()to read from stdin, but that's dangerous and it may cause OOM.Instead, we'd better directly stream it via HTTP. That way doesn't require to buffer at all.
pbgopy/commands/copy.go
Line 49 in 9e86a26