<?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 How to intercept request to restApi in Nuxeo in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-intercept-request-to-restapi-in-nuxeo/m-p/316142#M3143</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Sometimes a call to the rest API returns a broken image like this call, &lt;A href="http://dam.nuxeo.server:8080/nuxeo/restAPI/getTiles/default/88cebd21-084e-468c-9388-90bf2b2833f8/600/338/1?x=0&amp;amp;y=0" target="test_blank"&gt;http://dam.nuxeo.server:8080/nuxeo/restAPI/getTiles/default/88cebd21-084e-468c-9388-90bf2b2833f8/600/338/1?x=0&amp;amp;y=0&lt;/A&gt;
Although the image is uploaded successfully...&lt;BR /&gt; /&amp;gt;
CDN caches the response because the header has 200 status it is not 404 but the image is broken not ready yet may be. So I have to to purge all images on CDN then refresh to get the response with good image and cache the correct one. I thought of having a filter or a servlet before calling the rest api to intercept the respone and check its size, if the size is ridiculously small I would send a response of 404 so my CDN won't cache it.&lt;/P&gt;
&lt;P&gt;How would I implement this!! and if there is abetter way to solve my issue it would be great.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2013 13:53:11 GMT</pubDate>
    <dc:creator>Kareem_</dc:creator>
    <dc:date>2013-05-09T13:53:11Z</dc:date>
    <item>
      <title>How to intercept request to restApi in Nuxeo</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-intercept-request-to-restapi-in-nuxeo/m-p/316142#M3143</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Sometimes a call to the rest API returns a broken image like this call, &lt;A href="http://dam.nuxeo.server:8080/nuxeo/restAPI/getTiles/default/88cebd21-084e-468c-9388-90bf2b2833f8/600/338/1?x=0&amp;amp;y=0" target="test_blank"&gt;http://dam.nuxeo.server:8080/nuxeo/restAPI/getTiles/default/88cebd21-084e-468c-9388-90bf2b2833f8/600/338/1?x=0&amp;amp;y=0&lt;/A&gt;
Although the image is uploaded successfully...&lt;BR /&gt; /&amp;gt;
CDN caches the response because the header has 200 status it is not 404 but the image is broken not ready yet may be. So I have to to purge all images on CDN then refresh to get the response with good image and cache the correct one. I thought of having a filter or a servlet before calling the rest api to intercept the respone and check its size, if the size is ridiculously small I would send a response of 404 so my CDN won't cache it.&lt;/P&gt;
&lt;P&gt;How would I implement this!! and if there is abetter way to solve my issue it would be great.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2013 13:53:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-intercept-request-to-restapi-in-nuxeo/m-p/316142#M3143</guid>
      <dc:creator>Kareem_</dc:creator>
      <dc:date>2013-05-09T13:53:11Z</dc:date>
    </item>
  </channel>
</rss>

