Best way to log POST data in Apache?

前端 未结 8 1236
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 04:40

Imagine you have a site API that accepts data in the form of GET requests with parameters, or as POST requests (say, with standard url-encoded, &-separated POST data).

相关标签:
8条回答
  • 2020-11-27 05:06

    Use Apache's mod_dumpio. Be careful for obvious reasons.

    Note that mod_dumpio stops logging binary payloads at the first null character. For example a multipart/form-data upload of a gzip'd file will probably only show the first few bytes with mod_dumpio.

    Also note that Apache might not mention this module in httpd.conf even when it's present in the /modules folder. Just manually adding LoadModule will work fine.

    0 讨论(0)
  • 2020-11-27 05:07

    An easier option may be to log the POST data before it gets to the server. For web applications, I use Burp Proxy and set Firefox to use it as an HTTP/S proxy, and then I can watch (and mangle) data 'on the wire' in real time.

    For making API requests without a browser, SoapUI is very useful and may show similar info. I would bet that you could probably configure SoapUI to connect through Burp as well (just a guess though).

    0 讨论(0)
提交回复
热议问题