[go-nuts] Re: How to know the listener

2017-01-10 Thread hawk hsieh
The middleware is a better solution which I should learn and implement. Thanks! Nathan Kerr於 2017年1月11日星期三 UTC+8上午11時06分28秒寫道: > > RemoteAddr was completely blank for me. This may be because I am running > macOS. > > The important part is that the different contents of RemoteAddr indicates > th

[go-nuts] Re: How to know the listener

2017-01-10 Thread hawk hsieh
from https://github.com/Soulou/curl-unix-socket to > test the unix socket. > > Hopefully my server is similar to what you had. If not, please post some > code. > > Cheers, > > Nathan > > On Tuesday, January 10, 2017 at 3:23:30 PM UTC+1, hawk hsieh wrote: >> >&g

[go-nuts] How to know the listener

2017-01-10 Thread hawk hsieh
I open a port 80 and a unix socket to listen http request simultaneously. I would like to determine where is the request coming from so that the request from unix socket is no need to be authorized. Maybe the first problem is to know the listener from http.ResponseWriter or *http.Request. I gues