libevhtp icon indicating copy to clipboard operation
libevhtp copied to clipboard

Missing parsing of "authority" and "scheme" in request

Open patrickjane opened this issue 5 years ago • 2 comments

According to evhtp.h, the evhtp_uri struct contains a evhtp_authority_t struct, which in turn contains data about

  • username
  • password
  • hostname
  • port

However, this struct seems to be unused, with the members beeing empty during my tests. Also, in evhtp.c I can see that this struct will not get filled.

I this indented, or am I missing something? How am I supposed to get information about username/password? There is no other member in the structs/request object which holds this information, as far as I can see. For the host/port, I will be able to parse it myself since the "Host" HTTP header can be retrieved without problems.

Also, the scheme member of the evhtp_uri struct will always be set to htp_scheme_none, although I am definitely using HTTP.

I am using libevhtp version 1.2.16.

patrickjane avatar Sep 07 '18 14:09 patrickjane

sorry for the late reply; been dealing with hurricane stuff.

You're 100% correct, it doesn't seem like authority, even though it's parsed, is placed anywhere that is useful.

let me do some planning on this one and get back to you.

Cheers!

NathanFrench avatar Sep 18 '18 19:09 NathanFrench

Meanwhile I was able to parse the above properties in my implementation using the corresponding HTTP headers (Host for hostname/port, Authorization for username/password).

However out-of-the-box functionality in libevhtp would still be appreciated.

patrickjane avatar Sep 19 '18 06:09 patrickjane