0

I'm using koush/ion library to send post request to my server. It works using my home wifi, my friend's wifi, mobile data, and other's mobile data except for the office wifi.

It returns null and I've been wondering why. I somehow manage to print the error and it showed that the WFilter blocked my request. After that, i asked the IT in the office who manages the firewall to see the log of my requests and then saw a streaming request from the koush/ion that causes it to be blocked. When they disabled the streaming filter, i was able to send my post requests again using koush/ion.

My question is, is there something in ion/koush that i can add to my normal code to prevent this from happening? I'm not sure if it involves ports, or something but here's my simple code that works on most internet connections except in my office.

Ion.with(c)
            .load("POST",URL)
            .setTimeout(60 * 60 * 10000)
            .setLogging("ion-geny", Log.DEBUG)
            .progressDialog(pd)
            .setBodyParameter("reading_id", "" + reading_last_id)
            .setBodyParameter("book_id", "" + book_last_id)
            .setBodyParameter("article_id", "" + article_last_id)
            .setBodyParameter("month_id",""+month_last_id)
            .asJsonObject()
            .setCallback(new FutureCallback<JsonObject>() {
                @Override
                public void onCompleted(Exception e, JsonObject result) {
                    Log.e("loggers","loggers : "+result);
                }
            });
cattarantadoughan
  • 509
  • 1
  • 6
  • 15
  • "is there something in ion/koush that i can add to my normal code to prevent this from happening?" -- ask the IT staff what *exactly* their firewall rules are that are blocking your request. "saw a streaming request from the koush/ion" is not a particularly specific explanation. – CommonsWare Feb 15 '16 at 15:19
  • In that case ill ask them the full log of my requests and their rules of blocking. What else do you suggest that i need to ask the IT people there? – cattarantadoughan Feb 15 '16 at 15:30
  • 1
    Basically, the key is "what is the distinguishing characteristic(s) that block these requests?". For example, perhaps they are sniffing on the `User-agent` header. In that case, presumably Ion has an option to change that to something else (e.g., mimic some version of Firefox). Basically, until you can tell what is different about your request from, say, a request from an ordinary Web browser, there is nothing on which to base any Ion-specific configuration changes. – CommonsWare Feb 15 '16 at 15:33
  • Thanks for the great insight! I'll post all the info once i gather the data needed. – cattarantadoughan Feb 15 '16 at 16:28
  • @CommonsWare based on the logs from the firewall, my requests are detected as Shazam which are considered streaming. The IT people said they are only using presets of WFilter so they don't know exactly the configuration of that particular filter. – cattarantadoughan Feb 16 '16 at 08:48

0 Answers0