<div dir="ltr"><div>Replying to list.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This going to help me a lot! I&#39;m still planning to update my apiman instance. Could I just remove my old version (1.2.3) and then deploy the new one with my configurations files?</blockquote><div><br></div><div>Yes, that should work fine. You might want to build from master, considering the bug you encountered. I&#39;ll see if it&#39;s possible to at least do a snapshot release soon. People are on holiday at the moment.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><a href="http://stackoverflow.com/questions/41385736/how-to-avoid-chunked-encoding-when-the-rest-api-is-passing-through-apiman" target="_blank">How to avoid chunked encoding when the rest api is passing through APIMan?</a></blockquote><div> </div><div>At present we use chunked encoding[1] because it&#39;s much simpler when handling mutable streaming payloads - especially if we&#39;re doing a transformation where it is not be clear what the final payload size will be until the process is completed (which would cause substantial buffering).</div><div><br></div><div>That being said, in the case of a pipeline where no body mutation policies exist, we could consider setting content-length. I&#39;ll have to think about it to consider whether there are any important implications. This would be a feature request.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><a href="http://stackoverflow.com/questions/41432329/how-to-consume-a-service-with-chunked-encoding-transfer-in-java-using-jersey-fra" target="_blank">How to consume a service with chunked-encoding transfer in java using Jersey Framework</a></blockquote><div class="gmail_extra"><br></div><div class="gmail_extra">Chunked encoding has been supported since HTTP/1.1, unless you are using an extremely old/buggy version of Jersey it should work fine. It should be pretty much transparent in practice.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Your bug might be something else. I suggest trying the latest release and then filing a JIRA with full information (e.g. expected vs actual; console output; configuration). </div><div class="gmail_extra"><br></div><div class="gmail_extra"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Maybe this is happen for that reason -&gt; <a href="https://issues.jboss.org/browse/APIMAN-984" target="_blank">APIMAN 984</a></div></blockquote><div><br></div><div>I don&#39;t think you are using the policy mentioned in that ticket, are you?</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">For now, I do not found any ways to workaround that issue, so I think I&#39;m gonna create a policy / plugin to solve that, just to adding a response header setting the Content-Length on header. I don&#39;t know if it is a good idea, but maybe could solve this for while.</div></blockquote><div><br></div><div>You may be able to do that, but it would require buffering which will reduce performance. It may also be tricky to determine from within the policy which is the final chunk of a stream (with small payloads it&#39;s likely just 1 chunk, though). </div></div><div> </div><div class="gmail_quote">On 2 January 2017 at 22:12, Celso Agra <span dir="ltr">&lt;<a href="mailto:celso.agra@gmail.com" target="_blank">celso.agra@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks Marc!<br><br>This going to help me a lot! I&#39;m still planning to update my apiman instance. Could I just remove my old version (1.2.3) and then deploy the new one with my configurations files? </div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br>Just to let you know... I believe I got another issue with apiman:<div><div><ul><li><a href="http://stackoverflow.com/questions/41385736/how-to-avoid-chunked-encoding-when-the-rest-api-is-passing-through-apiman" target="_blank">How to avoid chunked encoding when the rest api is passing through APIMan?</a><br></li><li><a href="http://stackoverflow.com/questions/41432329/how-to-consume-a-service-with-chunked-encoding-transfer-in-java-using-jersey-fra" target="_blank">How to consume a service with chunked-encoding transfer in java using Jersey Framework</a><br></li></ul><div>Maybe this is happen for that reason -&gt; <a href="https://issues.jboss.org/browse/APIMAN-984" target="_blank">APIMAN 984</a> </div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>For now, I do not found any ways to workaround that issue, so I think I&#39;m gonna create a policy / plugin to solve that, just to adding a response header setting the Content-Length on header. I don&#39;t know if it is a good idea, but maybe could solve this for while. </div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div><div>Thanks for your help Marc!</div><div><br></div></div></div><div class="gmail_extra"><div><div class="m_-1929268401037838674m_-2370178541469833162m_4945649605162702661gmail-h5"><br><div class="gmail_quote">2017-01-02 17:04 GMT-03:00 Marc Savy <span dir="ltr">&lt;<a href="mailto:marc.savy@redhat.com" target="_blank">marc.savy@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I addressed this for Celso over JIRA.</div><div><br></div><div>Summary:</div><div><br></div><div>- In general, if you&#39;re using CORS you should probably use the query parameter to transmit your access token (if you have one). This is because of a limitation to CORS preflight request phase which never transmits custom headers.</div><div><br></div><div>- A separate issue was a bug (now fixed on master) where a data structure would cause certain header-value fields to be mixed up in specific circumstances.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1929268401037838674m_-2370178541469833162m_4945649605162702661gmail-m_8635594174553557201h5">On 28 December 2016 at 14:10, Celso Agra <span dir="ltr">&lt;<a href="mailto:celso.agra@gmail.com" target="_blank">celso.agra@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="m_-1929268401037838674m_-2370178541469833162m_4945649605162702661gmail-m_8635594174553557201h5"><div dir="ltr">Hi all,<div><br></div><div>It&#39;s me again!</div><div>So, I was looking for some solutions about my issue, and I found this: <a href="https://issues.jboss.org/browse/APIMAN-516" target="_blank">https://issues.jboss.org<wbr>/browse/APIMAN-516</a></div><div><br></div><div>It seems this issue still occurs with me. I tries to send some headers via ajax, and get this response:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font color="#e06666">XMLHttpRequest cannot load <a href="https://apiman.url" target="_blank">https://apiman.url</a>. Response to preflight request doesn&#39;t pass access control check: No &#39;Access-Control-Allow-Origin&#39; header is present on the requested resource. Origin &#39;<a href="http://192.168.56.22:8080" target="_blank">http://192.168.56.22:8080</a>&#39; is therefore not allowed access. The response had HTTP status code 500.</font></blockquote><div><br></div><div>Here is the Response Headers:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Connection:close<br>Content-Type:application/json<br>Date:Wed, 28 Dec 2016 13:54:08 GMT<br>Server:Apache/2.4.18 (Ubuntu)<br>Transfer-Encoding:chunked<br>X-Gateway-Error:API not public.<br>X-Powered-By:Undertow/1</blockquote><div><div><br></div><div>and</div><div><br></div><div>Here is the Request Headers:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Accept:*/*<br>Accept-Encoding:gzip, deflate, sdch, br<br>Accept-Language:pt-BR,pt;q=0.8<wbr>,en-US;q=0.6,en;q=0.4<br>Access-Control-Request-Headers<wbr>:authorization, x-api-key<br>Access-Control-Request-Method:<wbr>GET<br>Connection:keep-alive<br>Host: apiman.url<br>Origin:<a href="http://192.168.56.22:8080" target="_blank">http://192.168.56.22:80<wbr>80</a><br>Referer:<a href="http://192.168.56.22:8080/app" target="_blank">http://192.168.56.22:8<wbr>080/app</a><br>User-Agent:Mozilla/5.0 ...<br>Query String Parameters<br>view source<br>view URL encoded</blockquote><div><br></div><div>Does anyone has the same problem?</div><div><br></div><div>Best regards,</div><span class="m_-1929268401037838674m_-2370178541469833162m_4945649605162702661gmail-m_8635594174553557201m_-7747812049502744762HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-1929268401037838674m_-2370178541469833162m_4945649605162702661gmail-m_8635594174553557201m_-7747812049502744762m_-8271549169174132758gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:&quot;times new roman&quot;;font-size:16px">---<br><b>Celso Agra</b></span></div></div></div></div></div>
</font></span></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Apiman-user mailing list<br>
<a href="mailto:Apiman-user@lists.jboss.org" target="_blank">Apiman-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/apiman-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/apiman-user</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-1929268401037838674m_-2370178541469833162m_4945649605162702661gmail-HOEnZb"><font color="#888888">-- <br><div class="m_-1929268401037838674m_-2370178541469833162m_4945649605162702661gmail-m_8635594174553557201gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:&quot;times new roman&quot;;font-size:16px">---<br><b>Celso Agra</b></span></div></div></div></div></div>
</font></span></div>
</blockquote></div><br></div></div>