1

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

但是,它适用于小图片,但我想这不适用于视频或高分辨率图像。

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

4

1 回答 1

1

如果您阅读以下标准,您会看到不应该有限制,但网络服务器可能有(来自这里的引用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 不应该有任何限制

于 2013-07-06T11:01:26.953 回答