NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.9k stars 1.69k forks source link

removed remoteHostName from HTTPSession: it can take too long time to… #546

Closed wing9405 closed 5 years ago

wing9405 commented 5 years ago

… figure out via DNS

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.02%) to 85.166% when pulling cd37235110d6712204c77e2bdc463e84af6ed4e3 on wing9405:master into b04a342a4bcd0ff44be65138acffc73a29381c72 on NanoHttpd:master.

wing9405 commented 5 years ago

Figuring out a host name sometimes took several seconds and caused a HTTP request timeout in my environment. I guess the situation will be the same for many others. And, I doubt that the host name is really commonly used and required. I think It should be obtained in the 'serve(IHTTPSession session)' method, if required, in a not time-consuming way.

LordFokas commented 5 years ago

I actually had a JIT fix for this in v3.0 Since I can't seem to get that going any time soon, I'll accept this.