Live data from Hacker News

httpdiff – diff responses to two HTTP/HTTPS requests

github.com

11–20 of 41 posts

Re: httpdiff – diff responses to two HTTP/HTTPS requests

#14

The Unix way: diff &1) &1) As a shell function: httpdiff () { diff &1) &1) } httpdiff https://news.ycombinator.com/ https://news.ycombinator.com/

Which works well for that one example. But not others. diff &1) &1) On my machine that produces 33k of output. I like one liners and using the shell, but this tool was built not for fun because I was debugging things that were painful.

That's nothing a couple "1> /dev/null"'s can't solve (or redirect to a temporary file then "diff -q"). But yeah, yours is a bit nicer.

Re: httpdiff – diff responses to two HTTP/HTTPS requests

#16
post #9
post #7

Very cool! I'm a bit of a newb though - how do I install this?

1. You need Go 2a. Type 'make'. It will build the binary and place it in bin/ 2b. Use the go tool chain directly to build. Does the same thing as 2a.

why the makefile and src directory? Why not put the source in the root directory, so that go get github.com/jgrahamc/httpdiff would just work? The makefile doesn't even do anything useful, and just makes it so that poor windows folks can't build your code for no good reason.

Re: httpdiff – diff responses to two HTTP/HTTPS requests

#17
post #16
post #9

Earlier quoted context omitted.

1. You need Go 2a. Type 'make'. It will build the binary and place it in bin/ 2b. Use the go tool chain directly to build. Does the same thing as 2a.

why the makefile and src directory? Why not put the source in the root directory, so that go get github.com/jgrahamc/httpdiff would just work? The makefile doesn't even do anything useful, and just makes it so that poor windows folks can't build your code for no good reason.

Yes, you have to do the archaic `go get github.com/jgrahamc/httpdiff/src/httpdiff`. Truly a travesty. While the makefile allows you to avoid the whole GOPATH nonsense, which gets a plus from me.

Re: httpdiff – diff responses to two HTTP/HTTPS requests

#18
post #16
post #9

Earlier quoted context omitted.

1. You need Go 2a. Type 'make'. It will build the binary and place it in bin/ 2b. Use the go tool chain directly to build. Does the same thing as 2a.

why the makefile and src directory? Why not put the source in the root directory, so that go get github.com/jgrahamc/httpdiff would just work? The makefile doesn't even do anything useful, and just makes it so that poor windows folks can't build your code for no good reason.

Because... bad habits from larger projects.

Re: httpdiff – diff responses to two HTTP/HTTPS requests

#19
Getting x509 issues. Output is below:

$ httpdiff https://www.google.com http://www.google.com

Doing GET: https://www.google.com http://www.google.com

Error doing GET https://www.google.com: Get https://www.google.com: x509: certificate signed by unknown authority

I'm sitting behind a pretty heavy proxy though; could be that. That or OS X(10.9.5) certificate store issue maybe?

Post reply on HN