We did a `string_copy()` so `hdr.v1.line` is not the right base for an
accurate size. Fix.
Log unhanded amount. For clients waiting on the server before sending,
this has to be 0. For clients speaking first (TLS) this can be
non-zero.
goto proxyfail;
}
*end = '\0'; /* Terminate the string */
goto proxyfail;
}
*end = '\0'; /* Terminate the string */
- size = end + 2 - hdr.v1.line; /* Skip header + CRLF */
+ size = end + 2 - p; /* Skip header + CRLF */
DEBUG(D_receive) debug_printf("Detected PROXYv1 header\n");
DEBUG(D_receive) debug_printf("Detected PROXYv1 header\n");
+ DEBUG(D_receive) debug_printf("Bytes read not within PROXY header: %ld\n", ret - size);
/* Step through the string looking for the required fields. Ensure
strict adherence to required formatting, exit for any error. */
p += 5;
/* Step through the string looking for the required fields. Ensure
strict adherence to required formatting, exit for any error. */
p += 5;