我可以通过POST/GET发送多少字节


How many bytes can I send via POST / GET?

我有一个简单的Android应用程序,它从相机中拍摄一张照片,然后将图像转换为Base64字符。然后我将这个String发送到一个Web服务,Web服务将这个Base64转换为一个二进制文件,然后图像最终保存在服务器上。

然而,它适用于小图片,但我想这不可能与视频或高分辨率图像有关。

你们知道极限在哪里吗?我想这与你可以在请求中通过参数发送多少个字符直接相关,但找不到任何相关信息。

如果你阅读下面的标准,你会发现不应该有限制,但网络服务器可能有(引用这里的http 1.1)

The HTTP protocol does not place any a priori limit on the length of
a URI. Servers MUST be able to handle the URI of any resource they
serve, and SHOULD be able to handle URIs of unbounded length if they
provide GET-based forms that could generate such URIs. A server
SHOULD return 414 (Request-URI Too Long) status if a URI is longer
than the server can handle

据我所知,apache的GET请求的长度限制为4000个字符

对于POST,不应该有任何限制