开发者

How to minimize large amounts of data in an HTTP request?

I have an application made in Java for Android platforms, and I need to send quite a lot of data, the data I am sending is the previous weeks SMS messages received and sent. That includes the following data:

And you can imagine this data can be really big for some people so I need a way to minimize/encrypt it on one side, and then using an HTTP request I can send it over to my server, and decrypt this data with PHP. What is the best method to do this? What size limit does HTTP POST have?


I think you should zip+encrypt(say, using aes) the data on Android side before sending the data to your server and decrypt+unzip it on the server side.

Post size depends on the config on the server side -> What is the size limit of a post request?.

p.s. why would anyone want to send all their sms messages to your server? :)


You'll want to send the data using an HTTP POST. The limit on the HTTP POST size depends on the server receiving the data. For example a PHP server has the post_max_size property that (I think) by default is 16M. In terms of encryption start by making sure the request is being sent over HTTPS.


Do you have Gzip option turn on in your Apache HTTPD server?

This way the web server will compress and serve slightly packed files to and bro your browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜