InterestedDev
InterestedDev

Reputation: 588

Foursquare push API - The request timed out?

Using https://foursquare.com/oauth I am sending a test push message to a script page on my server. But the push message never comes through. I am getting an error message "Your Server returned: 502 Bad Gateway."

I can open URL I am pushing a message to via browser no problem. The URL is correct. No typos. But it uses HTTPs and self-signed certificate with does match the domain name. I went through Foursquare docs and they say self-signed certificates are OK to use. So this should not be a problem.

Please advise me how to fix this issue?

A little more details:

Here is URL I am sending a test push to https://www.hangmessage.com:8443/CloudMessage/FoursquareUserCheckinListener`

Servlet FoursquareUserCheckinListener(Partially):

protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  response.setContentType("text/html;charset=UTF-8");
  PrintWriter out = response.getWriter(); 

  try { 
    System.out.println("Push arrived!"); 
    out.println(""); 
  } finally {
    out.close();
  }   
} 

Why would it return "Your Server returned: 502 Bad Gateway"? :( The message "Push arrived" never prints out. Unless I open this URL in the browser.

Thank you very much!

Upvotes: 0

Views: 582

Answers (1)

akdotcom
akdotcom

Reputation: 4687

You might be having problems because you're using a non-standard SSL port. Can you try switching to port 443 and if the issue goes away? If so, that's definitely a bug on our part and we'll work to fix it.

Upvotes: 1

Related Questions