gzip response in output file is in messy code
with the following command:
sudo ./gor --input-raw :7000 --input-raw-track-response --output-http http://10.0.2.8:7000 --output-file %Y%m%d.log --output-file-append
the gizp response in output file is in messy code, cannot read, what did i miss or what can i do to make it readable?
🐵🙈🙉
2 69901e376d57647cd2afa5bd99d9d6a1df640346 1480941783555207578 1037107
HTTP/1.1 200 OK
X-Powered-By: Express
Vary: X-HTTP-Method-Override
content-encoding: gzip
X-Response-Time: 629.565ms
Date: Mon, 05 Dec 2016 12:43:02 GMT
Connection: close
Transfer-Encoding: chunked
2a63
�}i��8����)^b���m{�Gm��=�ol0X%�$�*�����<p�r��t�07�H<H$��Y��u��-��b�_��o��p�Ǣ�j�;�-p�gq�����f=,~��������i�E_��v���n��6}]���0��X��M
Զ;5m5�V(j�OU�
T[��M�t���h�S����7�j�17�FK�F�r������
Y�q��
0�k��XP�.ZE��r&�[�����[[���SN�!�~pL����g`G��}�����
�G�m����U����
x��s%#Ȯ��6��ĤB2��X@�%�kL�%���|�,�er��9�]74m��3y$F��\���4�䴮�;�c���Jq9HN��[Olb#6^��˲��p��fWA��9��{��
(���ڧ�*��T��ۦ:5f��:�g�Ͱ�r�FX�Ч][ka+�BO�r��������.,��N���Ed���#�?���� R-͠���j]�G/��� {X]LX[�9+���(,�모�!M�o�gR�wZ��濌b���Sլ���B��S�MC�o^���L%f�It�BH<�����f
֧:�M
���-�N��*��h�B12N�,_8��+)�H�A�Y}=��v�K�u�/gX�3��I%T_��+H(Ҡ�ęo@�����7�S<�= 4+VC1
���~��.���y���uLU8V�A5ό����{��̪k7�|E`���Wq�b������&#aBie�_�8�#��9�tn�D� �+`�a0��ڪ$)�b[�E�2�¬T�J"X���y�k�����Ɓ�wGHECKysPf�%�����;�R���Cu<j�?��[(Scw5O4R��|��7?���
덌�͚�Q�� pL���u��*�Ë'>Yx$�(v��q{�"��Ei��($�I�U
TO���|��Hc����*��f�l�)�dY�ZM�$TcZA�]A*;ۥRT�4N��fI���C��I�a�q�]�u\Ҹ�*��+PpZ�z���gb��D+v#K�4�_�`�
��h�n>v8=�B��;�?�H�*�2������^*6՞�l�нI���}����ۍ��]�SA�
j�.<��z����8��u3x�Z�ű�mZ���Q��
9�@�AKS�4���??ݽ�~�V,����@�x���,|4{��V*\��W}�vƆ�b����������>��k6cy@F�*o���3��G�|��&���n���5o-��Y���$Ӹ�9���gc�eq�dT��e�vq��p�\�*�%�˓
���0`�������p�Ւ�.�X�p,�!����Rؽ�Œ�b�b��_���+Da"`
One of the ways to do that is to write middleware that encode bodies for you (and removes content-encoding) header.
I'm thinking about adding option to automatically encode bodies if option passed. The only problem, that Gor claims to replay requests same way as original server, and if you are encode gzip bodies, while replaying you will get slightly different load on the target server.
It is may not be a problem, because the additional function is optional. Any one don't want it can ignore it.
Goreplay is a great work.
Cool! I'll close it for now.
I suggest add option to uncompress bodies, because I need get token from response body. thanks a lot
Actually already implemented in master: --prettify-http flag. It automatically uncompress body (fixes content-length), also it turns chunked data into single chunk.