Commit 3df066ef authored by Philipp Weber's avatar Philipp Weber

Add check for HTTP response code

parent 9935da0d
......@@ -138,6 +138,10 @@ private define __panstarrsRetrieveSite(url) {
variable str = "";
curl_setopt(c, CURLOPT_WRITEFUNCTION, &__panstarrsDownloadCallback, &str);
curl_perform(c);
variable response = curl_get_info (c, CURLINFO_RESPONSE_CODE);
if ( response != 200 ) {
throw RunTimeError, sprintf("Received HTTP response code %d instead of 200", response);
}
return str;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment