Large definition expression not using proxy page

I'm trying to set a definition expression for a FeatureLayer, and from looking at the generated request, the size is over the 2048 character limit. Ok, no problem, setup a proxy. However, when I do setup the proxy, the request is still going directly to the map service and not going through the proxy page. In an attempt to see what is going on, I set the alwaysUseProxy to true to force it. Now, it is calling the proxy, but it's calling it via a GET request instead of a POST which causes IIS to return a 403 error with the following message "Due to the presence of characters known to be used in Cross Site Scripting attacks, access is forbidden. This web site does not allow Urls which might include embedded HTML tags"I'm guessing that if it was a POST it might work, but I can't seem to figure out why it's using GET instead, or why when I don't have the alwaysUseProxy set that it doesn't try to use the proxy when it should due to the large size of the query string. Any ideas?

The where clause must be encoded before sending the request.Often simple quotation marks (') are used in the where clause, and some browsers seems to encode simple quotation marks and others don't.

What probably happens is that the API encodes the where-clause, and it does not encode simple qutation marks. The API then checks if the total url length is more than 2000(?) characters, if so it uses POST instead of GET.

But in our case FireFox did also encode the simple qutation marks, resulting that the request url length was larger than 2000 characters and still using GET method. This resulted in response error.