add: DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", k));
context: http_parse(struct soap *soap){ char header[SOAP_HDRLEN], *s;  unsigned short g = 0, k;  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for response...\n"));  *soap->endpoint = '\0';  soap->length = 0;  do  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))      return soap->error;    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf));    for (;;)    { if (soap_getline(soap, header, SOAP_HDRLEN))      { if (soap->error == SOAP_EOF)	{ soap->error = SOAP_OK;          DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n"));	  break;	}        return soap->error;      }      if (!*header)        break;      DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header));      s = strchr(header, ':');      if (s)      { *s = '\0';        do s++;        while (*s && *s <= 32);        if ((soap->error = soap->fparsehdr(soap, header, s)))          return soap->error;      }    }    if ((s = strchr(soap->msgbuf, ' ')))      k = (unsigned short)soap_strtoul(s, NULL, 10);    else      k = 0;  } while (k == 100);  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing\n"));  s = strstr(soap->msgbuf, "HTTP/");  if (s && s[7] != '1')  { if (soap->keep_alive == 1)      soap->keep_alive = 0;    if (k == 0 && (soap->omode & SOAP_IO) == SOAP_IO_CHUNK) /* k == 0 for HTTP request */    { soap->imode |= SOAP_IO_CHUNK;      soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;    }  }  if (soap->keep_alive < 0)    soap->keep_alive = 1;  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive));  if (s && (((g = !strncmp(soap->msgbuf, "GET ", 4))) || !strncmp(soap->msgbuf, "POST ", 5)))  { size_t m = strlen(soap->endpoint);    size_t n = m + (s - soap->msgbuf) - 5 - (!g);    if (n >= sizeof(soap->endpoint))      n = sizeof(soap->endpoint) - 1;    strncpy(soap->path, soap->msgbuf + 4 + (!g), n - m);    soap->path[n - m] = '\0';    strcat(soap->endpoint, soap->path);    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint));    if (g)    { soap->error = soap->fget(soap);      if (soap->error == SOAP_OK)        soap->error = SOAP_STOP; /* prevents further processing */      return soap->error;    }    return SOAP_OK;  }  if (k == 0 || (k >= 200 && k <= 299) || k == 400 || k == 500)    return SOAP_OK;  return soap_set_receiver_error(soap, "HTTP error", soap->msgbuf, k);}