We are using the JIRA REST interface to interact with a cloud-based JIRA instance. All our applications are using Basic Auth.
Occasionally I'm seeing REST requests fail with HTTP response that looks wrong.
This is what I get
- HTTP status is 200
- Response Body is empty
- Response headers indicate an Authentication failure
Here are some of the relevant headers I'm seeing in the HTTP Response
HTTP/1.1 200 OK
Connection: close
Content-Length: 0
Content-Type: text/html;charset=UTF-8
X-AREQUESTID: 105x142124x1
X-ASEN: SEN-2839797
X-Seraph-LoginReason: OUT
X-Seraph-LoginReason: AUTHENTICATED_FAILED
The initial symptom in the application code is a JSON parsing error because the JIRA libraries I've tried all expect a valid JSON document along with the 200 response - the empty document causes a JSON exception. Digging into the problem showed the presence of the strange 200 response.
I've reported this to Atlassian, but this strange behaviour can only be reproduced in our JIRA instance (they suggested I check here to see if anyone else is seeing the same symptoms). I can reproduce the problem to order by repeating the same REST command in a loop - the issue will usually kick in after a few minutes. I've verified that the issue can happen with any of the REST calls we are using (so I can see search, create & add comment & delete all fail with the same error).
Based on discussions with Atlassian, I can work around the issue by retrying the HTTP request, but I would prefer not to have the workaround at all. If there is a bug it would be better to get it fixed.
Anyone seen anything that looks like this? Remember the typical error from the application is likely to be an excepted JSON parsing error.
cheers
Paul