fix typo in Referer

This commit is contained in:
orignal 2022-05-27 13:29:59 -04:00
parent 1d6104ecf3
commit 1dded57a1c

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2021, The PurpleI2P Project * Copyright (c) 2013-2022, The PurpleI2P Project
* *
* This file is part of Purple i2pd project and licensed under BSD3 * This file is part of Purple i2pd project and licensed under BSD3
* *
@ -246,14 +246,14 @@ namespace proxy {
/** /**
* according to i2p ticket #1862: * according to i2p ticket #1862:
* leave Referrer if requested URL with same schema, host and port, * leave Referer if requested URL with same schema, host and port,
* otherwise, drop it. * otherwise, drop it.
*/ */
if(req.GetHeader("Referrer") != "") { if(req.GetHeader("Referer") != "") {
i2p::http::URL reqURL; reqURL.parse(req.uri); i2p::http::URL reqURL; reqURL.parse(req.uri);
i2p::http::URL refURL; refURL.parse(req.GetHeader("Referrer")); i2p::http::URL refURL; refURL.parse(req.GetHeader("Referer"));
if(!boost::iequals(reqURL.schema, refURL.schema) || !boost::iequals(reqURL.host, refURL.host) || reqURL.port != refURL.port) if(!boost::iequals(reqURL.schema, refURL.schema) || !boost::iequals(reqURL.host, refURL.host) || reqURL.port != refURL.port)
req.RemoveHeader("Referrer"); req.RemoveHeader("Referer");
} }
/* add headers */ /* add headers */