Skip to content

Commit

Permalink
Restore PROXY v2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed May 28, 2023
1 parent 46a3ef2 commit 7999d09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HttpParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,15 @@ struct HttpParser {
ProxyParser *pp = (ProxyParser *) reserved;

/* Parse PROXY protocol */
auto [done, offset] = pp->parse({start, (size_t) (end - postPaddedBuffer)});
auto [done, offset] = pp->parse({postPaddedBuffer, (size_t) (end - postPaddedBuffer)});
if (!done) {
/* We do not reset the ProxyParser (on filure) since it is tied to this
* connection, which is really only supposed to ever get one PROXY frame
* anyways. We do however allow multiple PROXY frames to be sent (overwrites former). */
return 0;
} else {
/* We have consumed this data so skip it */
start += offset;
postPaddedBuffer += offset;
}
#else
/* This one is unused */
Expand Down

0 comments on commit 7999d09

Please sign in to comment.