rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.82k stars 2.43k forks source link

Request Entity too large #2663

Open reneeichhorn opened 8 years ago

reneeichhorn commented 8 years ago

When I try to publish the crate: https://github.com/rust-openvr/rust-openvr-sys I get the following error:

cargo publish --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Uploading openvr_sys v0.1.1 (file:///C:/xxx/rust-openvr-sys)
failed to get a 200 OK response: Response {413, via: 1.1 vegur, content-type: text/html, content-length: 192, connection: close, server: nginx, date: Sun, 08 May 2016 09:43:47 GMT, <html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>
]

In my project I'm using a submodule that has the size ~300mb so I guess thats the problem, but anyway this should also print a proper error message instead of that. And what possibilities do I have to publish my crate?

alexcrichton commented 8 years ago

Ah yeah this is currently expected in the sense that crates.io only allows at most 10MB crate uploads. I can add exceptions on a crate-by-crate basis, but 300MB is kinda big :(

Some possibilities you could have are:

If you're pretty close to the limit (e.g. 15MB or instead of 10) I can bump the limit for this crate as well!

reneeichhorn commented 8 years ago

Thanks for your support! For now I added only the required stuff to my repo instead of the whole submodule, works fine now. The zipped repo is now at 5mb.

alexcrichton commented 8 years ago

Awesome! I'll leave this open to improve the error message

link2xt commented 1 year ago

For reference, the error message is here: https://github.com/rust-lang/cargo/blob/5c77b5da082a639b6930162a6caa068ebafa866f/crates/crates-io/lib.rs#L172

epage commented 1 year ago

Looking at this issue, it seems like the users concern is resolved and there isn't a note on what is remaining.

I'm assuming this is being left open for improving the quality of the error message (writing raw HTML to the screen makes it harder to read).