<?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 Random HTTP 400 error on POST request to alfresco in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/random-http-400-error-on-post-request-to-alfresco/m-p/282824#M235954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got a problem with getting POST HTTP request in alfresco.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I send a request with YAHOO.asyncRequest to /share/proxy/alfresco/… and sometimes i got a 400 response code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I always send the same request, and same parameters, so the problem is not here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I debugged Alfresco's code, and i realesed that RemoteClient send the HTTP request to /alfresco/s/…?ALF_TICEKT=…, but if error occours i can't see the request on alfresco side. On response 400 recieved. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tcpdumpped the request and if everything is alright i can see this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;POST /alfresco/s/…/institution-registration?close=true&amp;amp;instID=2&amp;amp;alf_ticket=TICKET_1eb2ac478ba6b2389c831de9014d3ab4564e4855 HTTP/1.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;connection: keep-alive&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;content-length: 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;origin: &lt;/SPAN&gt;&lt;A href="http://dani-alf:8080" rel="nofollow noopener noreferrer"&gt;http://dani-alf:8080&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;x-requested-with: application/json&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;accept: */*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;referer: &lt;/SPAN&gt;&lt;A href="http://dani-alf:8080/share/page/user/.../dashboard" rel="nofollow noopener noreferrer"&gt;http://dani-alf:8080/share/page/user/.../dashboard&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;accept-encoding: gzip,deflate,sdch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;accept-language: hu-HU,hu;q=0.8,en-US;q=0.6,en;q=0.4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Content-Type: application/json&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Host: localhost:8080&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expect: 100-continue&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTTP/1.1 100 Continue&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTTP/1.1 200 OK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Server: Apache-Coyote/1.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Content-Length: 133&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Date: Thu, 03 Jul 2014 07:40:19 GMT&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTTP/1.1 400 Bad Request&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Server: Apache-Coyote/1.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Transfer-Encoding: chunked&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Date: Thu, 03 Jul 2014 07:40:19 GMT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Connection: close&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If HTTP 400 occours:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;POST /alfresco/s/…/institution-registration?close=true&amp;amp;instID=2&amp;amp;alf_ticket=TICKET_1eb2ac478ba6b2389c831de9014d3ab4564e4855 HTTP/1.1&lt;BR /&gt;connection: keep-alive&lt;BR /&gt;content-length: 0&lt;BR /&gt;origin: &lt;A href="http://dani-alf:8080" rel="nofollow noopener noreferrer"&gt;http://dani-alf:8080&lt;/A&gt;&lt;BR /&gt;x-requested-with: application/json&lt;BR /&gt;user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36&lt;BR /&gt;accept: */*&lt;BR /&gt;referer: &lt;A href="http://dani-alf:8080/share/page/user/.../dashboard" rel="nofollow noopener noreferrer"&gt;http://dani-alf:8080/share/page/user/.../dashboard&lt;/A&gt;&lt;BR /&gt;accept-encoding: gzip,deflate,sdch&lt;BR /&gt;accept-language: hu-HU,hu;q=0.8,en-US;q=0.6,en;q=0.4&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Host: localhost:8080&lt;BR /&gt;Expect: 100-continue&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the logs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt; DEBUG [webscripts.connector.HttpConnector] [http-bio-8080-exec-218] Requested Method: POST URI: /…/institution-registration?close=true&amp;amp;instID=2&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218] Executing (POST) &lt;A href="http://localhost:8080/alfresco/s/.../institution-registration?close=true&amp;amp;instID=2&amp;amp;alf_ticket=TICKET_1eb2ac478ba6b2389c831de9014d3ab4564e4855" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/.../institution-registration?close=true&amp;amp;instID=2&amp;amp;alf_ticket=TICKET_1eb2ac478ba6b2389c831de9014d3ab4564e4855&lt;/A&gt;&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218]&amp;nbsp; - InputStream supplied - will push…&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218]&amp;nbsp; - OutputStream supplied - will stream response…&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218]&amp;nbsp; - OutputStream supplied - will stream response…&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218]&amp;nbsp; - Full Proxy mode between servlet request and response…&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218] Creating HttpClient instance for thread: http-bio-8080-exec-218&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218] Set Content-Type=application/json&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218] POST entity Content-Length=-2&lt;BR /&gt; … MY CODE …&lt;BR /&gt; org.apache.coyote.http11.AbstractHttp11Processor process&lt;BR /&gt;INFO: Error parsing HTTP request header&lt;BR /&gt; Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218] Response status code: 200&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-218] Response encoding: null&lt;BR /&gt; DEBUG [webscripts.connector.AuthenticatingConnector] [http-bio-8080-exec-218] Received 200 on first call to: /…/institution-registration?close=true&amp;amp;instID=2&lt;BR /&gt; DEBUG [servlet.mvc.EndPointProxyController] [http-bio-8080-exec-218] Return code: 200&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bad request log:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt; DEBUG [webscripts.connector.HttpConnector] [http-bio-8080-exec-112] Requested Method: POST URI: /…/institution-registration?close=true&amp;amp;instID=2&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-112] Executing (POST) &lt;A href="http://localhost:8080/alfresco/s/.../institution-registration?close=true&amp;amp;instID=2&amp;amp;alf_ticket=TICKET_1eb2ac478ba6b2389c831de9014d3ab4564e4855" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/.../institution-registration?close=true&amp;amp;instID=2&amp;amp;alf_ticket=TICKET_1eb2ac478ba6b2389c831de9014d3ab4564e4855&lt;/A&gt;&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-112]&amp;nbsp; - InputStream supplied - will push…&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-112]&amp;nbsp; - OutputStream supplied - will stream response…&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-112]&amp;nbsp; - Full Proxy mode between servlet request and response…&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-112] Set Content-Type=application/json&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-112] POST entity Content-Length=-2&lt;BR /&gt; DEBUG [webscripts.connector.RemoteClient] [http-bio-8080-exec-112] Response status code: 400&lt;BR /&gt; DEBUG [webscripts.connector.AuthenticatingConnector] [http-bio-8080-exec-112] Received 400 on first call to: /…/institution-registration?close=true&amp;amp;instID=2&lt;BR /&gt; DEBUG [servlet.mvc.EndPointProxyController] [http-bio-8080-exec-112] Return code: 400&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i figured out that on GET requests it doesn't happen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestion?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jul 2014 07:55:53 GMT</pubDate>
    <dc:creator>ulxdanny</dc:creator>
    <dc:date>2014-07-03T07:55:53Z</dc:date>
    <item>
      <title>Random HTTP 400 error on POST request to alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/random-http-400-error-on-post-request-to-alfresco/m-p/282824#M235954</link>
      <description>I got a problem with getting POST HTTP request in alfresco.I send a request with YAHOO.asyncRequest to /share/proxy/alfresco/… and sometimes i got a 400 response code.I always send the same request, and same parameters, so the problem is not here.I debugged Alfresco's code, and i realesed that Remot</description>
      <pubDate>Thu, 03 Jul 2014 07:55:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/random-http-400-error-on-post-request-to-alfresco/m-p/282824#M235954</guid>
      <dc:creator>ulxdanny</dc:creator>
      <dc:date>2014-07-03T07:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Random HTTP 400 error on POST request to alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/random-http-400-error-on-post-request-to-alfresco/m-p/282825#M235955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;please be aware that you need to handle the CSRF token manually when not using the Alfresco.util.Ajax utility, otherwise Share may reject a request due to missing / unmatching CSRF token in request. Please see &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/ewinlof/2013/03/11/introducing-the-new-csrf-filter-in-alfresco-share/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/ewinlof/2013/03/11/introducing-the-new-csrf-filter-in-alfresco-share/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;Introducing the new CSRF filter in Alfresco&amp;lt;/a&amp;gt; for details. Also note a special issue that affects POST request in a tabbed browsing scenario: &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="https://issues.alfresco.com/jira/browse/ALF-20815" rel="nofollow noopener noreferrer"&gt;https://issues.alfresco.com/jira/browse/ALF-20815&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;ALF-20815&amp;lt;/a&amp;gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 08:38:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/random-http-400-error-on-post-request-to-alfresco/m-p/282825#M235955</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2014-07-03T08:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Random HTTP 400 error on POST request to alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/random-http-400-error-on-post-request-to-alfresco/m-p/282826#M235956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your answer, CSRF token handling was the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 09:51:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/random-http-400-error-on-post-request-to-alfresco/m-p/282826#M235956</guid>
      <dc:creator>ulxdanny</dc:creator>
      <dc:date>2014-07-03T09:51:33Z</dc:date>
    </item>
  </channel>
</rss>

