From b64d7b967d4f985021b249c3933b917ba45ee7a5 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 24 Oct 2013 16:42:47 -0700 Subject: [PATCH] make sure the AC fails if script code is 4XX --- assignment-client/src/Agent.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index c85eb5e4c1..5b778b0552 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -87,6 +87,9 @@ void Agent::run() { // send a user agent since some servers will require it curl_easy_setopt(curlHandle, CURLOPT_USERAGENT, "libcurl-agent/1.0"); + // make sure CURL fails on a 400 code + curl_easy_setopt(curlHandle, CURLOPT_FAILONERROR, true); + qDebug() << "Downloading script at" << scriptURLString << "\n"; // blocking get for JS file