The current behavior that I'm seeing for TSUrlPortGet() is that for this request:
printf "GET / HTTP/1.1\r\nHost: mYhOsT.teSt:61000\r\n\r\n" | nc localhost 61001 it returns 80. Should TSUrlRawPortGet() return -1 ? For this request: printf "GET http://mYhOsT.teSt:61000/ <http://myhost.test:61000/> HTTP/1.1\r\n\r\n" | nc localhost 61001 TSUrlPortGet() returns 61000. Should TSUrlRawPortGet() also return 6100 ? On Thu, Oct 1, 2020 at 1:31 PM Alan Carroll < solidwallofc...@verizonmedia.com> wrote: > After discussions, this will be changed to TSUrlRawPortGet that returns 0 > if the port is not explicitly present in the URL. > > On Tue, Sep 29, 2020 at 9:28 AM Walt Karas <wka...@verizonmedia.com.invalid> > wrote: > >> This gets the port string in the URL. If the port is not in the URL, it >> returns nullptr (and sets length to zeor). Note this is subtly different >> from TSUrlPortGet which always returns a valid port, the canonical port >> for >> the scheme if the port is not specified. Currently there is no way to >> detect this from a plugin. >> >> char const* TSUrlPortGet(TSMBuffer, TSMLoc, int* length); >> >