Adafruit_FONA icon indicating copy to clipboard operation
Adafruit_FONA copied to clipboard

Problem with HTTPS - HTTP

Open MeGrimlock opened this issue 9 years ago • 1 comments

Hi,

I experienced some seriuos problems while debugging an issue while using the GET method to an nginx server.

The issue was that even if my URL was http, the library would force it to https. I'm not sure what was causing this, but after browsing the .cpp i only found this function on Adafruit_FONA.cpp at the Adafruit_FONA::HTTP_setup function.

To fix this issue I made a minor adjustment to the Adafruit_FONA.cpp:

` // HTTPS redirect if (httpsredirect) { if (! HTTP_para(F("REDIR"),1)) return false;

if (! HTTP_ssl(true))
  return false;

}else{ if (! HTTP_ssl(false)) return false;
} `

This is probably not the best place to insert my little patch but I suggest you somehow manage to prevent SSL when not required.

MeGrimlock avatar Jun 30 '16 12:06 MeGrimlock

Hi, can you tell me how can i rebuild the cpp file?

roysG avatar Mar 26 '21 05:03 roysG