RockytheSquirrel

Can the changes in how REST handles JSON content-type affect ability to browse directory?

Discussion created by RockytheSquirrel on Dec 14, 2018

Background: we are upgrading to ArcGIS Enterprise from 10.2.2 to 10.6.1. We use a proxy server direct traffic from www to our ArcGIS Server inside our firewall. We use Web Adaptor on the proxy server. 

Using our 10.2.2 environment, one can browse the public REST directory using the HTML interface:

https://gis.dallascityhall.com/wwwgis/rest/services

We have a test DNS set up for our new proxy and server. When you submit the corresponding URL to browse the REST catalog, a 500.52 error is thrown that indicates the URL Rewrite module cannot handle the gzip compression.

https://testgis.dallascityhall.com/wwwgis/rest/services

The error description in Failed Request logs is:

Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").

We are using the same basic rewrite rules as before. However, a what's new article indicates that the content-type for JSON changed at 10.6:

The content-types for JSON and JSON with callback responses have been changed from text/plain.

For JSON: Content-Type:application/json;charset=utf-8
For JSON with callback: Content-Type:application/javascript;charset=utf-8

If you put a format tag at the end of the URL to indicate output as JSON (?f=json), the query works just fine. Leave off the format tag and you get a 500.52 error.

I suspect this has something to do the with content-type changes at 10.6, but I'm not sure what corrective action to take in ArcGIS Server (and presumably Portal) to address the issue. Or, maybe this is not the issue at all. 

Behavior is the same in Chrome and Edge. IE doesn't know what to do with the URL; it keeps prompting you to Open or Save the services.json file.

Both proxy servers are Windows 2012 R2 IIS 8.5. Both have CA Signed certificates and registered domains. The only other major difference is the test DNS (10.6.1 Enterprise) only accepts HTTPS (port 443); HTTP is disabled (port 80). The architecture (other than Enterprise version) is otherwise identical.

One other thing. The expires header shows Wed, 31 Dec 1969 18:00:00 CST. I found articles on Apache that indicates it is confidential/private variable setting in the web.xml. But this is IIS, so I am not sure this is related.

Outcomes