Adafruit_FONA
Adafruit_FONA copied to clipboard
Problem with HTTPS - HTTP
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.
Hi, can you tell me how can i rebuild the cpp file?