There are still servers around that that don't set one
and Privoxy doesn't really need it anyway.
-const char parsers_rcs[] = "$Id: parsers.c,v 1.291 2014/07/25 11:56:54 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.292 2014/07/25 11:57:17 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
{
p++;
reason_phrase = strchr(p, ' ');
{
p++;
reason_phrase = strchr(p, ' ');
- if (reason_phrase != NULL)
- {
- reason_phrase++;
- }
- if ((reason_phrase == NULL) || (reason_phrase[0] == '\0') ||
- (3 != sscanf(*header, "HTTP/%u.%u %u", &major_version,
- &minor_version, &(csp->http->status))))
+ if (reason_phrase != NULL)
+ {
+ reason_phrase++;
+ }
+ else
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "Response line lacks reason phrase: %s", *header);
+ reason_phrase="";
+ }
+
+ if (3 != sscanf(*header, "HTTP/%u.%u %u", &major_version,
+ &minor_version, &(csp->http->status)))
{
log_error(LOG_LEVEL_ERROR,
"Failed to parse the response line: %s", *header);
{
log_error(LOG_LEVEL_ERROR,
"Failed to parse the response line: %s", *header);