33#include "GatewayError.h"
36using namespace gateway;
49 err =
"Remote Request failed for url: " + url +
" with error: ";
53 FILE *f = fopen(filename.c_str(),
"r");
55 err = err +
"Could not open the error file " + filename;
61 const unsigned int bufsize = 1025;
64 size_t bytes_read = fread(buff, 1, bufsize-1, f);
65 if (0 == bytes_read) {
69 if (bytes_read < bufsize)
70 buff[bytes_read] =
'\0';
72 buff[bufsize-1] =
'\0';
static void read_error(const std::string &filename, std::string &err, const std::string &url)
read the target response file that contains textual error information