Confluence https rest requests fail, http rest requests succeeds

Hi, how would cause rest requests towards an confluence instance on https fail while rest requests towards http succeed?

 

An (truncated) example:

 

curl -D- -X GET -H "Authorization: Basic <base64 encoded user:pass>" http://mydomain/confluence/rest/api/content/12345

HTTP/1.1 200 OK
Date: Wed, 19 Oct 2016 07:36:50 GMT
Server: Apache-Coyote/1.1
X-ASEN: SEN-4713507
X-Seraph-LoginReason: OK
X-AUSERNAME: <username>
Cache-Control: no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Content-Type-Options: nosniff
Content-Type: application/json
Set-Cookie: JSESSIONID=A5CC9394A692F4333B8A13A5061693E0; Path=/confluence/; HttpOnly
Connection: close
Transfer-Encoding: chunked

{"id":"33505798", ... }

 


curl -D- -X GET -H "Authorization: Basic <base64 encoded user:pass>" https://mydomain/confluence/rest/api/content/12345

HTTP/1.1 404 Not Found
Date: Wed, 19 Oct 2016 07:36:44 GMT
Server: Apache-Coyote/1.1
X-ASEN: SEN-4713507
Cache-Control: no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Content-Type-Options: nosniff
Content-Type: application/json
Connection: close
Transfer-Encoding: chunked

{"statusCode":404,"data":{"authorized":false,"valid":true,"errors":[]},"message":"No content found with id: ContentId{id=12345}"}



Any ideas?

1 answer

Looks like something in the https rewrite goes wrong as it returns a 404. I assume you are terminating SSL and http at a mod proxy in front of confluence, and point the traffic to the high port of tomcat after that? Is this a implementation that works while using a regular webbrowser, or is it all a new setup?

This is an existing setup (1y+), but integration via REST to update certain pages is new.

Perhaps 404 is a bit misleading as well, as the response actually tells us that nothing by that id was found... which should not mean that the request did not reach the endpoint?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

292 views 11 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you