Use numbers instead of constants for HTTP response code check.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Poco 1.7 doesn't have HTTPResponse::HTTP_PERMANENT_REDIRECT.
This commit is contained in:
parent
d74b3cabfa
commit
1d7153008a
|
@ -156,13 +156,14 @@ namespace remwharead
|
||||||
session->sendRequest(request);
|
session->sendRequest(request);
|
||||||
istream &rs = session->receiveResponse(response);
|
istream &rs = session->receiveResponse(response);
|
||||||
|
|
||||||
|
// Not using the constants because some are too new for Debian stretch.
|
||||||
switch (response.getStatus())
|
switch (response.getStatus())
|
||||||
{
|
{
|
||||||
case HTTPResponse::HTTP_MOVED_PERMANENTLY: // 301
|
case 301: // HTTPResponse::HTTP_MOVED_PERMANENTLY
|
||||||
case HTTPResponse::HTTP_PERMANENT_REDIRECT: // 308
|
case 308: // HTTPResponse::HTTP_PERMANENT_REDIRECT
|
||||||
case HTTPResponse::HTTP_FOUND: // 302
|
case 302: // HTTPResponse::HTTP_FOUND
|
||||||
case HTTPResponse::HTTP_SEE_OTHER: // 303
|
case 303: // HTTPResponse::HTTP_SEE_OTHER
|
||||||
case HTTPResponse::HTTP_TEMPORARY_REDIRECT: // 307
|
case 307: // HTTPResponse::HTTP_TEMPORARY_REDIRECT
|
||||||
{
|
{
|
||||||
return make_request(response.get("Location"));
|
return make_request(response.get("Location"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue