Is it possible to log the bytes which a server sends? [closed]

102
January 19, 2021, at 9:00 PM
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 4 hours ago.

Improve this question

Is it possible to log the bytes which a server sends? I see the entries in a log file like below (edited to hide ip etc.). The entry says "file.php" has been called and 123 bytes have been send, but sometimes I see an unusual size like 444 bytes (example only). Can I somehow duplicate the data which my server (server of my provider) sends to someone, and store it in a specific file (e.g. with microtime to be a unique file). ((in fact, I just thought, for the beginning, I could duplicate the $_POST data which "file.php" receives - that might also help to understand what is going on.)) BTW, it is only about text data, and small data sizes. I could also store what the printf statements in the php-file print out. But I am afraid that "sometimes" there could be some error messages inbetween, too. And that is what I do not know. That is why, I would like to clone the complete server response from file.php, to see what the e.g. 444 bytes, indicated in the log-file, really are. If there is a mechanism to detect that 444 bytes have been sent, there should also be a mechanism just to store these 444 bytes (according to some simple logic).

(((only for better understanding: I wrote "file.php" and I can edit it. I realized that in some rare cases, very strange data has been sent to file.php, which is not really within the possible limitations of my client. So I also do not know, what somebody gets out of it, except if I could clone the response.)))

2021-01-19 02:XX:XX Access  XXX.XXX.XXX.XXX 200 POST /file.php HTTP/1.0  123    SSL/TLS Apache
2021-01-19 02:XX:XX Access  XXX.XXX.XXX.XXX 200 POST /file.php HTTP/1.0  123    SSL/TLS Apache
2021-01-19 02:XX:XX Access  XXX.XXX.XXX.XXX 200 POST /file.php HTTP/1.0  444    SSL/TLS Apache
READ ALSO
What is the difference between // and .// in XPath?

What is the difference between // and .// in XPath?

When I execute these XPath expression on Chrome Developer Tools' console over googlecom, I got the same results

66
NodeJS checking if XML element exists and add or delete

NodeJS checking if XML element exists and add or delete

I'm working with XML in NodeJSI've been using the xmlbuilder to create my XML

54
Extracting array value from nested array of objects

Extracting array value from nested array of objects

Hi guys i have created the following array of objectsAnd to be honest i am a little bit lost

94