<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can the changes in how REST handles JSON content-type affect ability to browse directory? in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-the-changes-in-how-rest-handles-json-content/m-p/4747#M28</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Background: we are upgrading to &lt;EM&gt;ArcGIS Enterprise&lt;/EM&gt; 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 &lt;EM&gt;Web Adaptor&lt;/EM&gt; on the proxy server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using our 10.2.2 environment, one can browse the public REST directory using the HTML interface:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://gis.dallascityhall.com/wwwgis/rest/services"&gt;https://gis.dallascityhall.com/wwwgis/rest/services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;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 &lt;STRONG&gt;500.52&lt;/STRONG&gt; error is thrown that indicates the &lt;EM&gt;URL Rewrite&lt;/EM&gt; module cannot handle the gzip compression.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://testgis.dallascityhall.com/wwwgis/rest/services"&gt;https://testgis.dallascityhall.com/wwwgis/rest/services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error description in &lt;EM&gt;Failed Request&lt;/EM&gt; logs is:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="font-size: 11.0pt;"&gt;Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").&lt;/EM&gt;&lt;EM style="font-size: 11.0pt;"&gt;Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;We are using the same basic rewrite rules as before. However, a&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/services-reference/what-s-new.htm"&gt;what's new&lt;/A&gt;&amp;nbsp;article indicates that the content-type for JSON changed at 10.6:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;The content-types for JSON and JSON with callback responses have been changed from text/plain.&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;For JSON: Content-Type:application/json;charset=utf-8&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;For JSON with callback: Content-Type:application/javascript;charset=utf-8&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If you put a format tag at the end of the URL to indicate output as JSON (&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;?f=json&lt;/SPAN&gt;), the query works just fine. Leave off the format tag and you get a &lt;STRONG&gt;500.52&lt;/STRONG&gt; error.&lt;/P&gt;&lt;P&gt;I suspect this has something to do the with &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;content-type&lt;/SPAN&gt; changes at 10.6, but I'm not sure what corrective action to take in &lt;EM&gt;ArcGIS Server&lt;/EM&gt; (and presumably &lt;EM&gt;Portal&lt;/EM&gt;) to address the issue. Or, maybe this is not the issue at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Behavior is the same in &lt;EM&gt;Chrome&lt;/EM&gt; and &lt;EM&gt;Edge&lt;/EM&gt;. &lt;EM&gt;IE&lt;/EM&gt; doesn't know what to do with the URL; it keeps prompting you to &lt;EM&gt;Open or Save&lt;/EM&gt; the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;services.json&lt;/SPAN&gt; file.&lt;/P&gt;&lt;P&gt;Both proxy servers are &lt;EM&gt;Windows 2012 R2 IIS&lt;/EM&gt; 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 &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;HTTPS&lt;/SPAN&gt; (port 443); &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;HTTP&lt;/SPAN&gt; is disabled (port 80). The architecture (other than &lt;EM&gt;Enterprise&lt;/EM&gt; version) is otherwise identical.&lt;/P&gt;&lt;P&gt;One other thing. The &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;expires&lt;/SPAN&gt; header shows &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Wed, 31 Dec 1969 18:00:00 CST&lt;/SPAN&gt;. I found articles on Apache that indicates it is &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;confidential/private&lt;/SPAN&gt; variable setting in the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;web.xml&lt;/SPAN&gt;. But this is &lt;EM&gt;IIS&lt;/EM&gt;, so I am not sure this is related.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2018 18:46:19 GMT</pubDate>
    <dc:creator>Michael_RMiller</dc:creator>
    <dc:date>2018-12-14T18:46:19Z</dc:date>
    <item>
      <title>Can the changes in how REST handles JSON content-type affect ability to browse directory?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-the-changes-in-how-rest-handles-json-content/m-p/4747#M28</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Background: we are upgrading to &lt;EM&gt;ArcGIS Enterprise&lt;/EM&gt; 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 &lt;EM&gt;Web Adaptor&lt;/EM&gt; on the proxy server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using our 10.2.2 environment, one can browse the public REST directory using the HTML interface:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://gis.dallascityhall.com/wwwgis/rest/services"&gt;https://gis.dallascityhall.com/wwwgis/rest/services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;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 &lt;STRONG&gt;500.52&lt;/STRONG&gt; error is thrown that indicates the &lt;EM&gt;URL Rewrite&lt;/EM&gt; module cannot handle the gzip compression.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://testgis.dallascityhall.com/wwwgis/rest/services"&gt;https://testgis.dallascityhall.com/wwwgis/rest/services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error description in &lt;EM&gt;Failed Request&lt;/EM&gt; logs is:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="font-size: 11.0pt;"&gt;Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").&lt;/EM&gt;&lt;EM style="font-size: 11.0pt;"&gt;Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;We are using the same basic rewrite rules as before. However, a&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/services-reference/what-s-new.htm"&gt;what's new&lt;/A&gt;&amp;nbsp;article indicates that the content-type for JSON changed at 10.6:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;The content-types for JSON and JSON with callback responses have been changed from text/plain.&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;For JSON: Content-Type:application/json;charset=utf-8&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;For JSON with callback: Content-Type:application/javascript;charset=utf-8&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If you put a format tag at the end of the URL to indicate output as JSON (&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;?f=json&lt;/SPAN&gt;), the query works just fine. Leave off the format tag and you get a &lt;STRONG&gt;500.52&lt;/STRONG&gt; error.&lt;/P&gt;&lt;P&gt;I suspect this has something to do the with &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;content-type&lt;/SPAN&gt; changes at 10.6, but I'm not sure what corrective action to take in &lt;EM&gt;ArcGIS Server&lt;/EM&gt; (and presumably &lt;EM&gt;Portal&lt;/EM&gt;) to address the issue. Or, maybe this is not the issue at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Behavior is the same in &lt;EM&gt;Chrome&lt;/EM&gt; and &lt;EM&gt;Edge&lt;/EM&gt;. &lt;EM&gt;IE&lt;/EM&gt; doesn't know what to do with the URL; it keeps prompting you to &lt;EM&gt;Open or Save&lt;/EM&gt; the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;services.json&lt;/SPAN&gt; file.&lt;/P&gt;&lt;P&gt;Both proxy servers are &lt;EM&gt;Windows 2012 R2 IIS&lt;/EM&gt; 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 &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;HTTPS&lt;/SPAN&gt; (port 443); &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;HTTP&lt;/SPAN&gt; is disabled (port 80). The architecture (other than &lt;EM&gt;Enterprise&lt;/EM&gt; version) is otherwise identical.&lt;/P&gt;&lt;P&gt;One other thing. The &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;expires&lt;/SPAN&gt; header shows &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Wed, 31 Dec 1969 18:00:00 CST&lt;/SPAN&gt;. I found articles on Apache that indicates it is &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;confidential/private&lt;/SPAN&gt; variable setting in the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;web.xml&lt;/SPAN&gt;. But this is &lt;EM&gt;IIS&lt;/EM&gt;, so I am not sure this is related.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2018 18:46:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-the-changes-in-how-rest-handles-json-content/m-p/4747#M28</guid>
      <dc:creator>Michael_RMiller</dc:creator>
      <dc:date>2018-12-14T18:46:19Z</dc:date>
    </item>
  </channel>
</rss>

