davecheney / httpstat

It's like curl -v, with colours.
MIT License
7.05k stars 384 forks source link

Too many colons #6

Closed mholt closed 8 years ago

mholt commented 8 years ago

First, this is awesome, thanks for making a Go version of this!

But it doesn't like when I need to specify a port:

httpstat "http://45.56.15.67:8680/"
2016/09/23 09:03:11 unable to resolve host: too many colons in address 45.56.15.67:8680:80

(Believe me, I wish this was just on port 80 like every other website. But I'm having connectivity issues to it which is why I thought I'd try httpstat, ha.)

ericmdantas commented 8 years ago

The port (:80 in http case) is being appended no matter what, see: https://github.com/davecheney/httpstat/blob/master/main.go#L86-L100.

mholt commented 8 years ago

Yep, you're right. I'd submit a PR right now if I wasn't on my way to class...

n10v commented 8 years ago

I think, https://github.com/davecheney/httpstat/pull/7 fixes it too

ericmdantas commented 8 years ago

Thanks, I closed mine.

davecheney commented 8 years ago

Sorry about that, the logic to split the host and port is very dumb. It needs to be made better.

wrt #7 i'm on the fence about using the httptrace package, see my comments in that PR for details.

If someone wants to have a crack at a better host:port split function, please do so.

mholt commented 8 years ago

I have a fix inbound

mholt commented 8 years ago

That's strange, why does it show c4f8adb09210466d67a495aebdd5b36d69485e23 in your commit tree?

davecheney commented 8 years ago

No idea.

On Sat, Sep 24, 2016 at 9:05 AM, Matt Holt notifications@github.com wrote:

That's strange, why does it show c4f8adb https://github.com/davecheney/httpstat/commit/c4f8adb09210466d67a495aebdd5b36d69485e23 in your commit tree?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/davecheney/httpstat/issues/6#issuecomment-249322309, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA4vW9Ix6GpHnMWcDQzT-29eHGZmuks5qtFs6gaJpZM4KFE_P .