4 ms·
I could be lost here (C/PHP/Node coder mainly in code I've used) Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any
by ricardo81 2y ago
I could be lost here (C/PHP/Node coder mainly in code I've used)
Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any other process/function? I'd guess most people use libcurl and you can wrap something around that.
I guess I'm lost on why this is HTTP or Python specific, or if it is, fine.
- robertlagrant 2y agoI think the nice thing about HTTP for this is different parts of the stack can introduce default headers etc and it's helpful to be able to see the actual request after all that processing's been done.
- ricardo81 2y agoWith curl there's always CURLOPT_VERBOSE as per the library.
- seanc 2y agoIn the old days we'd use tcpdump and wireshark for this, but nowadays everything is encrypted up in the application layer so you need this kind of thing. Or tricky key dumping hacks.
- toomuchtodo 2y agohttps://www.charlesproxy.com/ https://www.charlesproxy.com/ ?
- cle-b 2y agoUnlike other tools such as proxies that allow you to trace HTTP requests, httpdbg makes it possible to link the HTTP request to the Python code that initiated it. This is why it is specific to Python and does not work with other languages.
- ricardo81 2y agoI'm still not understanding. If you're coding something up, why wouldn't you know that piece of code does a HTTP/s request? Based on what you said, it sounds like a scenario where a programmer doesn't know how a request was made. Are there examples of scenarios where that's the case? Sounds like a bit of a security nightmare where there's code doing arbitrary requests.
- bityard 2y agoMaybe you are working with an application or library that you didn't write, and want to see the raw requests and responses it generates without reading the entirety of the source code. Maybe you are generating HTTP requests through an API and need to see which headers it sets by default, or which headers are or are not getting set due to a misconfiguration or bug. There are probably loads more use cases, and if I actually did programming for a living, I could probably list a lot more.
- ricardo81 2y agoThe 3rd party library stuff makes sense, to an extent. But then you're debugging a 3rd party library.
- diegoallen 2y agoIf a 3rd party library you depend on has bugs, you have bugs. And you need to either submit a patch to the library or find a workaround.
- ricardo81 2y agoOr just not use arbitrary 3rd party stuff hoping it works :) libcurl is used on billions of devices across the world and has plenty of debugging capabilities. MITM proxy works across all languages.
- 2y ago
- deleted 2y ago[deleted]